Zum Hauptinhalt gehen

Uploading Files to a Server File System

Kommentare

2 Kommentare

  • Dean Howell

    Has anyone got a successful way of uploading a file to a server location from a workflow?

    0
  • Amanda Frech

    The on-prem version of studio workflow can write files to the server where workflow is installed.

    You make a client workflow like this

    -Display Form has the file picker to select the file

    -Get Base64 activity input is: =$form1.state.filePicker1.value.files[0]

    -Run Workflow activity Arguments input is: ={base64FromClientWorkflow: $getBase64.result,
    fileName:$form1.state.filePicker1.value.files[0].name}

     

    Then the Server workflow that it runs looks like this:

     

    -Get Bytes activity's input is: =$getWorkflowInputs1.inputs.base64FromClientWorkflow

    -Write File Bytes "Path" input is: ="C:/ProgramData/Geocortex/Workflow/" + $getWorkflowInputs1.inputs.fileName

    -Write File Bytes "Bytes" input is: =$getBytesFromBase64String1.result

     

    I always test with the already-existing workflow data directory folder as the path to start, which is usually something like "C:/ProgramData/Geocortex/Workflow/".  Then when that's confirmed working, you can try other locations.  You sometimes need to add read/write permissions for the "IIS AppPool\GeocortexWorkflow" or "IIS AppPool\VertiGISStudioWorkflow" identity to the folder you're writing to.

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.