Jelajahi Sumber

Fixed frontend upload

kanadeko 8 tahun lalu
induk
melakukan
14ddf495b3
2 mengubah file dengan 1 tambahan dan 3 penghapusan
  1. 0 2
      controllers/uploadController.js
  2. 1 1
      public/js/upload.js

+ 0 - 2
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)

+ 1 - 1
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,