AnsweredAssumed Answered

Minimally working sample for JSAPI using upload of a REST service though proxy

Question asked by kefayati on Oct 14, 2014
Latest reply on Oct 16, 2014 by kefayati

Has anyone successfully used the file upload of ArcGIS's REST API using their JS API though a proxy? I have used all the samples and read through esri.request documentation and still cannot get it working.


Here is quick look at my file uploader code:


function uploadFile( svcName, form , uploadSucceeded, uploadFailed){     gpUploadURL = "http://"+gisServer+":6080/arcgis/rest/services/"+svcName+"/GPServer/uploads/upload";      console.log('Uploading file...', gpUploadURL);     esri.request({         url: gpUploadURL,           form: dojo.byId(form),          //callbackParamName: "callback",         //content: { f: "jsonp" },         handleAs : "json",      }/*,{usePost: true, useProxy:true}*/).then(uploadSucceeded, uploadFailed); }