You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when I use it for big files upload, I meet a issue about the request of "/update". Fallow the tutorial, there is my code on server.
# uploade.js
var options = {
tmpDir: __dirname + '/../public/points/tmp',
uploadDir: __dirname + '/../public/points/files',
uploadUrl: '/pointsupload/uploaded/files/',
storage : {
type : 'local'
}
};
var uploader = require('blueimp-file-upload-expressjs')(options);
router.get('/', function (req, res, next) {
res.render('pointsupload');
});
router.get('/upload', function (req, res) {
uploader.get(req, res, function (err, obj) {
if(!err){
res.send(JSON.stringify(obj));
}
});
});
router.post('/upload', function (req, res) {
uploader.post(req, res, function (err, obj) {
if(!err){
res.send(JSON.stringify(obj));
}
});
});
router.delete('/uploaded/files/:name', function (req, res) {
uploader.delete(req, res, function (err, obj) {
if(!err){
res.send(JSON.stringify(obj));
}
});
});
# app.js
var pointsupload = require('./routes/pointsupload');
app.use('/pointsupload', pointsupload);
When I enter "http: localhost:XX/pointsupload/upload" on the browser, I get some errors as follow.
path.js:7
throw new TypeError('Path must be a string. Received ' + inspect(path));
^
TypeError: Path must be a string. Received undefined
at assertPath (path.js:7:11)
at Object.basename (path.js:799:5)
at getFileKey (D:\Tom\share\pointCloud\node_modules\blueimp-file-upload-expressjs\lib\fileinfo.js:12:17)
at new FileInfo (D:\Tom\share\pointCloud\node_modules\blueimp-file-upload-expressjs\lib\fileinfo.js:24:16)
at D:\Tom\share\pointCloud\node_modules\blueimp-file-upload-expressjs\lib\transport\local.js:24:40
at Array.forEach (native)
at D:\Tom\share\pointCloud\node_modules\blueimp-file-upload-expressjs\lib\transport\local.js:21:22
at FSReqWrap.oncomplete (fs.js:123:15)
so I views the source of local.js and fileinfo.js. On 15:37 of local.js, It use FileInfo class which is defined on fileinfo.js, but it didn't define the "path" param.
when I use it for big files upload, I meet a issue about the request of "/update". Fallow the tutorial, there is my code on server.
When I enter "http: localhost:XX/pointsupload/upload" on the browser, I get some errors as follow.
so I views the source of local.js and fileinfo.js. On 15:37 of local.js, It use FileInfo class which is defined on fileinfo.js, but it didn't define the "path" param.
but In the source of fileinfo.js, FileInfo class need file param has path property and getFileKey function use it.
The text was updated successfully, but these errors were encountered: