How to download the output from the Create File activity
I am looking for a way to expose the output from a "Create File" activity of a VertiGIS Studio Saas Workflow to the end users.
Here is the case:
- We send a web request to an external service. The output is a base64 string that represent the content of a pdf file.
- Using the "Create File" activity, a file object is created client side.
How do we expose this output file to the end user? Ideally it should be a download link, but this requires a url to the file. I have not found a way to obtain a url to the output file
-
Hi Martin,
Create File is intended for adding attachments to features. For a download link from base64, use Get Bytes From Base64 String with Create Download instead.
Rafael
1 -
Thanks for your reply Rafael. Unfortunately non of the two activities suggested are supported client side. I am working with the saas version of VertiGIS Studio, and creating server side workflows is therefore not an option.
0 -
I see - since the output of Create File is a File object, you might find success using URL.createObjectURL() in a Create Value activity to get the URL. I haven't tested this, but I suspect that this would be the only option client-side.
0 -
This thread inspired the creation of a new activity pack https://github.com/vertigis/workflow-activities-web-apis that provides Create Object URL and Download File activities that run completely in the browser and should be able to address this type of use case in the SaaS environment.
--Ryan
3 -
Awesome! I will be sure to refer anyone looking for this to this pack
0 -
Wow, that’s great news! Thank you very much for responding with a solution this quickly. We will try out the new activity pack straight away.
0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
6 kommentarer