AnsweredAssumed Answered

JavaScipt web map - local shapefile used as parameter to geoprocessing service

Question asked by ammielke11 on Sep 18, 2015

Does anyone have an example of a JavaScipt web map that allows a user to upload a local shapefile to be appended to a feature class in a map service.  It seems like this is pretty straight forward.  I created a geoprocessing service using the append tool that works in the desktop environments. I am using the upload url to upload the zipped shapefile but don't know how to call that file so that it can be used in my GP services.  The GP service only has one input parameter.



Parameter: Input_Datasets

Data Type: GPMultiValue:GPFeatureRecordSetLayer

Display Name: Input Datasets

Description:Data to add to Action Areas

Direction: esriGPParameterDirectionInput

Default Value:

Parameter Type: esriGPParameterTypeRequired



            function upload()


                var upload = esriRequest({

                  url: "",

                  form: dojo.byId("uploadForm"),

                  content: { f: "pjson" },

                  handleAs: "json",

                  load: displayResult,

                  error: uploadFailed


                upload.then(uploadSucceeded, uploadFailed);