Upload a file to a server workflow
What is the recommended way to upload a file from a client workflow to a server workflow? I am now using Get Base64 String From File and pass the result as a string argument to the server workflow, but this seems kind of inefficient.
Is it possible to just pass the File object, and recreate that in the server workflow?
-
Hi Berend,
Unfortunately, I think Base64 might be your best bet.The main problem is that the request to run a server workflow must include the entirety of the inputs up front. There isn't really a way to use a stream or something like that to transmit it over time.
The only other idea I could suggest would be finding a way to zip it on the client prior to sending, since we have the Extract Zip To Directory server-only activity which could be used at the other end.
0 -
Can someone please provide some examples on how to upload a file to a server please?
3 -
Dean Howell, once you have a File object in a client-side WF (for example from using a FilePicker in a Form), use the Get Base64 String From File activity to serialize the file, then send it to a Server WF. In the child WF, use a Get Bytes from Base64 String activity to generate bytes which you can pass to a Write File activity. The VertiGIS Workflow service will need write permissions to the output directory.
Ken Lyon, this seems like it would be a useful pair of templates.
1 -
I am trying to do this. We have field workers on ipad who take a photo using the file picker. I am using the above sequence to send it to the server workflow where I want to use a Write File Bytes activity to save it to a server location. But I am unsure about how to give the workflow service write permissions to the output directory. Zack Robison, can you outline how to do this? Thanks!
0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
4 kommentarer