How to get file name of uploaded file dropzone package?

I am using dropzonejs plugin
I uploaded a file /files/sample.pdf. While uploading how to take the uploaded file name as sample.pdf.

1 Like

You have to use getFileName function inside UploadServer.init:

  tmpDir: '/tmp/',
  uploadDir: '/var/www/upload/',
  checkCreateDirectories: true,
  uploadUrl: '/upload/',
  getFileName: function(file, formData) {

Check this link for more details :wink: