Accessing the original file name with a jQuery direct upload

Comments

1 comment

  • Avatar
    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
    Comment actions Permalink

Please sign in to leave a comment.