From 14ddf495b319988634aa58257d0ed80f703f3d6b Mon Sep 17 00:00:00 2001 From: kanadeko Date: Mon, 16 Jan 2017 05:35:36 -0300 Subject: [PATCH] Fixed frontend upload --- controllers/uploadController.js | 2 -- public/js/upload.js | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/controllers/uploadController.js b/controllers/uploadController.js index 47d0d43..a374137 100644 --- a/controllers/uploadController.js +++ b/controllers/uploadController.js @@ -82,8 +82,6 @@ uploadsController.list = function(req, res){ file.date = new Date(file.created_at * 1000) file.date = file.date.getFullYear() + '-' + file.date.getMonth() + '-' + file.date.getDate() + ' ' + (file.date.getHours() < 10 ? '0' : '') + file.date.getHours() + ':' + (file.date.getMinutes() < 10 ? '0' : '') + file.date.getMinutes() + ':' + (file.date.getSeconds() < 10 ? '0' : '') + file.date.getSeconds() - - } return res.json(files) diff --git a/public/js/upload.js b/public/js/upload.js index 699506c..bb60f28 100644 --- a/public/js/upload.js +++ b/public/js/upload.js @@ -39,7 +39,7 @@ window.onload = function () { var dropzone = new Dropzone('div#dropzone', { url: '/api/upload', - paramName: 'file', + paramName: 'files[]', maxFilesize: maxSize, parallelUploads: 2, uploadMultiple: false,