watson-developer-cloud / document-conversion-nodejs Goto Github PK
View Code? Open in Web Editor NEWDEPRECATED: Please use https://github.com/watson-developer-cloud/discovery-nodejs
Home Page: http://document-conversion-demo.mybluemix.net/
DEPRECATED: Please use https://github.com/watson-developer-cloud/discovery-nodejs
Home Page: http://document-conversion-demo.mybluemix.net/
The demo runs out of space if we don't remove the files in the upload
folder. We used to do this using the find-remove
package.
findRemoveSync = require('find-remove');
// Remove files older than 1 hour every hour.
setInterval(function() {
var removed = findRemoveSync(__dirname + '/../uploads', { age: { seconds: 3600 } });
if (removed.length > 0) {
console.log('removed:', removed);
}
}, 3600000);
Is possilbe increase size to 10 mb?
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm ERR! Linux 4.2.0-27-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v4.4.4
npm ERR! npm v2.15.1
npm ERR! code EPEERINVALID
npm ERR! peerinvalid The package [email protected] does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants react@^0.14.0 || ^15.0.0
npm ERR! peerinvalid Peer [email protected] wants react@^15.4.0
npm ERR! peerinvalid Peer [email protected] wants react@^15.4.0
npm ERR! peerinvalid Peer [email protected] wants react@^0.14.6 || ^15.0.0
npm ERR! peerinvalid Peer [email protected] wants react@~0.14 || ~15.3.0
When I pick my own PDF file on the official demo it gets converted beautifully. However, when I follow the instructions, only the sample documents work, but when I upload my own file I get the following errors in my log:
2015-11-25T04:40:07.38+0100 [App/0] OUT error: { code: 'ENOENT',
2015-11-25T04:40:07.38+0100 [App/0] OUT error: 'ENOENT, open 'uploads/1448422807362-Survey of Text Clustering Algorithms.pdf'' } url: /files
[...]
2015-11-25T04:40:07.58+0100 [App/0] OUT error: { code: 'ENOENT',
2015-11-25T04:40:07.58+0100 [App/0] OUT error: 'ENOENT, no such file or directory '/home/vcap/app/uploads/'' } url: /api/convert?document_id=&conversion_target=NORMALIZED_TEXT
Any help to solve this would be highly appreciated. Thanks in advance.
Best,
Joe
We need to convert document without having to persisting them.
@Lhuihui we probably want to send the file and the output in one request as a form submission.
The nodejs-wrapper supports document conversion of files that were not uploaded to the service.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.