Upload file to server with ArcObjects

643
0
07-13-2016 11:32 AM
Highlighted
New Contributor

Hi

I create a geoprocess in arcgis server with upload capacity. This service works fine when tested in browser, runtime and javascript api, but not with ArcObjects.

I could did the upload by IServiceUploadsClient interface. The itemID was returned in IUploadItem interface, but I do not know how use this id in IGPDataFile interface.

I tried:

IGPDataFile gpDataFile = new GPDataFileClass();

gpDataFile.File = "{'itemID':'" + uploadItem.ID + "'}";

I tried too:

gpDataFile.DataType = "zip";

gpDataFile.Data = new ESRI.ArcGIS.GeoDatabaseDistributed.GDSData();

gpDataFile.Data.TransportType = ESRI.ArcGIS.GeoDatabaseDistributed.esriGDSTransportType.esriGDSTransportTypeUpload;

In other time, I tried gpDataFile.File = uploadItem.ID;

I do not know how do this.

Someone can helpe me?

Thanks

Cristian

Reply
0 Kudos
0 Replies