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';
    });
}
};
1
  • 1
    What code do you have so far/what have you tried? Commented Jun 19, 2015 at 13:10

1 Answer 1

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';
});
Sign up to request clarification or add additional context in comments.

1 Comment

I not sure where to write it

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.