rename file option not working in dropzone.js

I’ve been trying to rename the filename before the upload in dropzone.js but I’m not able to make it work. This is my configuration:

Dropzone.autoDiscover = false;
Dropzone.options.myAwesomeDropzone = {
    url: url,
    paramName: "image",
    dictDefaultMessage: 'Selecciona tus archivos..',
    dictRemoveFile: "Eliminar",
    dictCancelUpload: "Cancelar carga",
    addRemoveLinks: true,
    uploadMultiple: false,
    renameFile: function (file) {
        console.log(file.name);
        file.name = new Date().getTime() + '_' + file.name;
    },
    new Dropzone("div#my-awesome-dropzone");

When it upload nothing is even showing in the js console and the file name is still the same

Has someone gone through this?

I tried this solution: Dropzone.js – How to change file name before uploading to folder

106 thoughts on “rename file option not working in dropzone.js”

  1. hello!,I really like your writing so a lot! proportion we
    keep up a correspondence extra approximately your post on AOL?
    I need a specialist on this area to resolve my problem.
    Maybe that is you! Taking a look ahead to peer you.

    Reply
  2. Good day! This post could not be written any better!
    Reading through this post reminds me of my good old room mate!
    He always kept chatting about this. I will forward this article to him.
    Pretty sure he will have a good read. Thanks for sharing!

    Reply
  3. What’s Taking place i am new to this, I stumbled upon this I’ve discovered It positively useful and
    it has helped me out loads. I’m hoping to give
    a contribution & assist different customers like its aided me.
    Great job.

    Reply
  4. Aw, this was an exceptionally good post. Taking the time and actual effort to make a really good article… but what can I say… I put things off a whole lot and don’t manage to
    get nearly anything done.

    Reply
  5. Howdy! I could have sworn I’ve been to this blog before but
    after checking through some of the post I realized it’s new
    to me. Anyhow, I’m definitely glad I found it and I’ll be book-marking and checking back often!

    Reply

Leave a Comment