ios - Save files to server folder from UIWebView -
i have input type file placed in uiwebview. when user selects file ipad/iphone, need save file remote server. have tried encrypt file base64 , using jquery ajax, send api decodes file , saves server folder. when encrypt file, , make ajax call, ajax success function returns 'undefined' may because size of data send(base64 string) large.
$.ajax({ type: 'post', contenttype: 'application/json; charset=utf-8', url: 'https://www.myserver.com/api/controller/method', data: json.stringify({filename: "base64 string" , questionid: '28faf0fb-9d12-477c-ada5-2adc816063c7' , fileext: "png" ,sid:'45bdd775-477d-4ca2-9d89-9724366aec36'}), processdata: false, datatype: 'json', success: function(response) { alert(response); }, error: function(xhr, ajaxoptions, thrownerror) {alert(xhr.responsetext); } });
yes does. restrictions might have been set server side in web.config looks this
<httpruntime executiontimeout="3600" maxrequestlength="20480" requestvalidationmode="2.0" maxquerystringlength="2097151"/> <httpruntime executiontimeout="3600" maxrequestlength="20480" requestvalidationmode="2.0" maxquerystringlength="2097151"/>
as base64 can large data send, try using byte array. convert image byte array , send server using ajax post request.
Comments
Post a Comment