kopia lustrzana https://github.com/OpenDroneMap/NodeODM
Strengthened param check on /task/new
rodzic
fdc5529152
commit
5ea69e5e66
2
index.js
2
index.js
|
@ -114,7 +114,7 @@ let server;
|
|||
* $ref: '#/definitions/Error'
|
||||
*/
|
||||
app.post('/task/new', addRequestId, upload.array('images'), (req, res) => {
|
||||
if (req.files.length === 0) res.json({error: "Need at least 1 file."});
|
||||
if (!req.files || req.files.length === 0) res.json({error: "Need at least 1 file."});
|
||||
else{
|
||||
let srcPath = path.join("tmp", req.id);
|
||||
let destPath = path.join(Directories.data, req.id);
|
||||
|
|
Ładowanie…
Reference in New Issue