Reply content:
Paste part of the code you see, backstage is Nodejs, hope to help you
View
Api:
exports.upload = function(req, res) { //express file info var resource = req.files.resource;}
Js:
$("#fmUpload").dropzone({ paramName: 'resource',(看此处) url: '/images/upload', dictDefaultMessage: '将文件拖拽至此区域进行上传(或点击此区域)', acceptedFiles: 'image/*', parallelUploads: 1, maxFilesize: 1, maxFiles: 1, init: function() {}, success: function(file, data) { if (data.status === 1) { $scope.uploadImage = data.message; $scope.listUserImages(); } else { alertService.showAlert({ content: data.message, type: 'warning' }); $('.dz-error-mark').show(); } } });
Want to ask the landlord, your data.php, in addition to do file upload operation, other such as operation of the database operation can be carried out?
I am also using this plugin, but encountered a problem, when the selected file upload to the specified path, the foreground how to display, want to file upload operation, the database insert operation, but can not be executed, I do not know whether the landlord has encountered such a problem?