GPDataFile with Create Temp File activity
Hi,
There is a question similar to this one from along ago on the forums but no reply for it.
I am trying to pass a .DWG (CAD) file into a Geoprocessing Task made with Python.
If I try to pass a file siting oa a virtual directory such as "http://52.174.186.xxx/Outputs/Site/LT1061_ETRS.dwg "
it works without problem.
If I try to create a a temp file and pas it to the same service it doesn´t work, such as
"http://server/Geocortex/Essentials/REST/TempFiles/Test.dwg?guid=26820df7-79ab-40d4-a0c9-f0ba582cb4c7&contentType=text%2Fdwg"
Can anyone help me? Is this a known issue? Is the file somehow losing something when converted?
PS (I tried with all MIME types for the DWG to no avail).
Would appreciate the help.
Thanks
0
-
Hi Ricardo,
I'm not 100% sure on this, but I think the geoprocessing inputs that accept a web request do not handle web addresses that have URL parameters (e.g. our GUID and contentType parameters). I have observed this behavior but I do not have any documentation confirming it.
If you can republish the geoprocessor, then you could call it directly with a Feature parameter rather than a file path.
Otherwise, you may be able to use Workflow to download the file and copy it to a web-hosted folder that would let you use an absolute URL with no parameters for your geoprocessor.
Regards,
-Malcolm0 -
HI Ricardo,
I'm having the exactly same issue with try to upload a file for GPService. Could you please explain a bit more what you mean by "call it directly with a Feature parameter rather than a file path"? How I do this with a DWG file? Also I've enabled the Upload capability to the GPService and upload the DWG file to AGS and got a return itemID. According to AGS doc it's possible to use GPItemID to replace GPDataFile. However, I couldn't find a way in the Geoprocessor activity to use GPItemID. any thoughts? thanks.0 -
Hi Jack, had the same issue and ended up modifying the XAML outside the Workflow Designer, replacing GPDataFile with GPDataItem. Cheers, Hen 0 -
Thanks Hen for the tip. In my case I ended up replace %2F to / in the file URL and that works. also make sure you have "applicaiton/.dwg" for the content type 0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
4 kommentarer