ProgerXP / FileDrop

Self-contained cross-browser pure JavaScript class for Drag & Drop and AJAX (multi) file upload.
filedropjs.org
The Unlicense
264 stars 61 forks source link

Save Dropped file with couchdb #50

Open nirmal-tops opened 9 years ago

nirmal-tops commented 9 years ago

I am using couchdb jquery api. With normal input type file, I am saving image as attachment with ajaxsubmit request .

HTML::

JS::

$('#form_id').ajaxSubmit({ // Submit the form with the attachment url: "/"+ database_name +"/"+ couchdb_document_id, success: function(response) { console.log("success"); }, error: function(data, error, reason) { console.log("error"); } });

Now I want to save dropped file. but I am getting base64 encoded string, which is representing the image.

I want to drooped image as a file object. How can I get same file object for dropped element, as I am getting while uploading with input type file.