Hi!
The requirement is this:
- I want the user to upload a csv file (easy with file picker)
- The uploaded file is used to update a table (easy with a workflow)
- The uploaded file is deleted
I have two questions:
- How can i delete the specific file used on the workflow? (how can i get the path?)
- If the user selects differents files before clicking the procesing button all the files are uploaded and stored. How can i delete all this “temporal” files?
Take into account it’s a customer portal where different users can upload differents files at the same time.
Update: I created a session variable (text) to store the file_path of the uploaded file. In the file picker, in the “On Change” action i created a workflow to delete the file on the file_path path (it works) and then i can store the new file_path on the variable (i’m using concat(base_path,filename from the file picker, “.”, file extension from the file picker). It works!
The problem is when the user doesn’t press the process button… in this case the file is stored in the storage and never deleted…
Update 2:
I created an automation that search all the files in the folder and then deletes them using an iterator.
It “works”
Let me know if you see a better way to do this
PD: A “valid time” for the storage would be nice.