How can I pass file using javascript/jQuery/JSON/Ajax to Insert into database as a blob? -


this question has answer here:

i'm using front-end angularjs, there file upload option. when upload file pass back-end java web services , insert database. flow have do.

my problem is, how can pass file using json ajax web services, please let me know further questions required.

thanks in advance.

ajax doesnt support file uploading. can use formdata fileupload work html5 supported browsers.and if want work older browsers can use iframe form fileupload.

var form = $('form')[0];  var formdata = new formdata(form);  $.ajax({    url: 'submitnewsection.html',    data: data,    type: 'post',    success: function ( data ) {      alert( data );    } }); 

Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -