Skip to main content

Accessing the original file name with a jQuery direct upload

Comments

1 comment

  • Daniel Mendoza

    Hello Aleix,

    I would like to apologize for the late reply. We do have a way to retrieve the original file name at the beginning of the upload process. I have added the code snippet below. Please let me know if this works for you.

    $(".cloudinary-fileupload").cloudinary_fileupload({


         add: function(e, data){
                 console.log(data.files[0].name);

                 data.submit(); // Needed to continue executing the remainder of the code below         
         }

         start: function(e, data){
                 SOME CODE TO GET THE ORIGINAL FILE NAME...
         }


         fail: function(e, data){
                 SOME CODE TO GET THE ORIGINAL FILE NAME...
         }

    0

Post is closed for comments.