aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkanadeko <[email protected]>2017-01-16 05:35:36 -0300
committerkanadeko <[email protected]>2017-01-16 05:35:36 -0300
commit14ddf495b319988634aa58257d0ed80f703f3d6b (patch)
tree64c0922498bf48ba533bad1a966a9e34970963e6
parentChanged upload from single file to array (diff)
downloadhost.fuwn.me-14ddf495b319988634aa58257d0ed80f703f3d6b.tar.xz
host.fuwn.me-14ddf495b319988634aa58257d0ed80f703f3d6b.zip
Fixed frontend upload
-rw-r--r--controllers/uploadController.js2
-rw-r--r--public/js/upload.js2
2 files changed, 1 insertions, 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,