0

I'm trying to make an image upload website using Dropzone.js.

I need to change the image to a unique name but I can only change the display name or the name that the image saves.

This the code that I got now:

Dropzone.options.fileupload = {
paramName: "file", // The name that will be used to transfer the file
maxFilesize: 10, // MB

init: function() {
    this.on('processingfile', function(file) {
        file.name = 'test.jpg';
    });
}
};
Ram
  • 3,092
  • 10
  • 40
  • 56
sh1omi
  • 71
  • 1
  • 1
  • 9

1 Answers1

0

There is no clear way to do this.

Uploading multiple files with the same file.name using dropzone.js

Use processing event: (not working)

myDropone.on('processing', function(file) {
  file.name = 'justin-bieber.jpg';
});
Community
  • 1
  • 1
befzz
  • 1,232
  • 13
  • 11