Create temporary file in a server workflow
In legacy workflows, we had the Create Temp File activity. What is the best way to create temporary files in new (server) workflows?
All file related activities seem to require a fixed directory- or filename, but if there is a way to get the system's TEMP folder, I could use that.
Another thing that we could use Create Temp File for, was to create a downloadable file. Is that something that's on the roadmap for a future version?
-
Hi Berend,
Have you tried using the Create Download activity?
https://docs.geocortex.com/workflow/latest/help/Default.htm#wf5/help/activities/create-download.htm
In regards to creating a specific temp file in a directory, the only approach I'm aware of would be to use the Write File activity and write it to a specific temp directory on the web server.
Thanks,
-- Patrick1 -
Hi Patrick,
I hadn't seen the Create Download activity, that could be useful.
However, sometimes I still need to store a temporary file somewhere, for instance, in some scenarios that use Merge PDFs or Create Zip From Directory. It would help if I could get the system's 'temp directory' and go from there, rather than having to use a hardcoded directory such as C:\Data, which I would have to configure somewhere, set permissions on, making sure it exists at all times, etc.
(I know that's not the same as what Create Temp File did, but I did use Path.GetTempPath() )
0 -
Hi Berend,
I tried using %TEMP% but sadly it treats it as a relative path based on the install location. Maybe that's something we could fix in a future release.
In the meantime, you could determine the path for the temp path based on the app pool's identity. On my workstation, it is this:
C:\Users\VertiGISStudioWorkflow\AppData\Local\Temp
I was able to write to this location using the "Write File" activity.
0 -
Any update on this?
How do we get the temp file path?0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
4 kommentarer