Hoppa till huvudinnehållet

Create temporary file in a server workflow

Kommentarer

4 kommentarer

  • Patrick Fingler

    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,

    -- Patrick

    1
  • Berend Veldkamp

    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
  • Ken Lyon

    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
  • Niluka Munasinghe

    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.