AnsweredAssumed Answered

Issue on Loading Saver Side Zip File to ESRI Request

Question asked by behClevest on Aug 6, 2017
Latest reply on Aug 8, 2017 by jgrayson-esristaff

ArcGIS JavaScript API is using This Demo to upload and pass a Zipped shapefile to esriRequest using "esri/request" module.

Now my question is is there any way that we load and pass a zipped shaefile from Server and not from client side like accessing the file by Ajax?


at current demo , thr form option is filling by `uploadForm` elemt by user submit at 

    form: dom.byId('uploadForm'),



    url: portalUrl + '/sharing/rest/content/features/generate',
    content: myContent,
    form: dom.byId('uploadForm'),
    handleAs: 'json',
    load: lang.hitch(this, function (response) {
    if (response.error) {
    var layerName = response.featureCollection.layers[0];
    error: lang.hitch(this, errorHandler)

Now, I need to pass a file directly to the options instead of using HTML File Dialog and Input. Something like:

//Get the zipped file from Ajax Call and pass it to a data variable
var data = "";

// assign form with data
form: data,