Open nirmal-tops opened 9 years ago
I am using couchdb jquery api. With normal input type file, I am saving image as attachment with ajaxsubmit request .
$('#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.
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.