Can an HTML file object be used directly as input for GP service?

05-03-2015 11:16 PM
Regular Contributor III

I have a GP service which takes as input a GPDataFile. I want to be able to upload a file from a local machine and then let a GP service to process it. This functionality is working as expected when I use the Upload Item with ArcGIS Server.

However I am wondering if this is really necessary. Is it possible to supply the html file object directly?

HTML code to browse to a file.

<input id="uploadInput" type="file" name="myFile">

JavaScript code to get the file. Returns an File object.


Can this File object be given as input directly to a GP service which accepts GPDataFile as input?

1 Reply
Occasional Contributor III

I don't believe so.  You will need to use the geoprocessing service's upload function to get the file to the server.