Select to view content in your preferred language

Upload Excel for GP service using Javascript API?

2646
1
Jump to solution
12-12-2012 03:37 AM
JackZHANG
Frequent Contributor
Hello, I have a GP service take a spreadsheet as input to convert to feature class. The GP service has upload capability turned on.

I want to build web page using Javascript API to allow user upload spreadsheet for the GP service. So the I figure out there're two steps: Step1. use REST API to upload the file to server. The server will return a page has the itemID of the uploaded file. Step 2. Use the itemID to build a DataFile object as the input of the GP service. My question is, How can I in Javascript get the itemID?
0 Kudos
1 Solution

Accepted Solutions
JackZHANG
Frequent Contributor
had a bit more research on weekend and got the solution. For request REST service better use esri.request (esri namespace method).
For example of the submit a form request, ESRI has provide some code examples here:

http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi_start.htm#jsapi/namespace_esri.htm
http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp_start.htm#jshelp/inside_esri_request....

View solution in original post

0 Kudos
1 Reply
JackZHANG
Frequent Contributor
had a bit more research on weekend and got the solution. For request REST service better use esri.request (esri namespace method).
For example of the submit a form request, ESRI has provide some code examples here:

http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi_start.htm#jsapi/namespace_esri.htm
http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp_start.htm#jshelp/inside_esri_request....
0 Kudos