Hi @michielschram ,
To be able to upload a file through the FME Server interface you don't actually need to include a Reader, all that is needed is a published parameter of type File. Therefore I think you could replace the Data File Reader>StringSearcher>Sampler with a Creator. Then in the AttributeManager set the output attribute filecopy_source_dataset to the source file published parameter. This should move the file from the temp upload location to the directory you are watching without any unnecessary file processing.
Hi @hollyatsafe ,
Thank you for your answer. Your solution works fine for uploading one file but I can not upload several files. My use case is uploading 1:n files for processing. Is there another solution?
Hi @hollyatsafe ,
Thank you for your answer. Your solution works fine for uploading one file but I can not upload several files. My use case is uploading 1:n files for processing. Is there another solution?
Hi @michielschram ,
Is the overall goal for the end user to upload a zip containing several files and this workspace should unzip and copy each of the files separately into the directory watch to be processed individually, or for the entire zip file to be copied into the directory being watched?
Hi @hollyatsafe
The overall goal is to upload several files with different extensions but with the same calculation settings. I'm setting up a system to "feed" an api and proces the result. The files contain sources which should be calculated and can be a .gml, .pdf or zipped.
Hi @hollyatsafe
The overall goal is to upload several files with different extensions but with the same calculation settings. I'm setting up a system to "feed" an api and proces the result. The files contain sources which should be calculated and can be a .gml, .pdf or zipped.
Hi @michielschram ,
It's not possible to upload multiple files into a single published parameter so I think there are a few alternative options.
Option 1
Set up your workspace with multiple File published parameters and make these optional. There would still be a limit on the number of files the user could upload but this could be, say 5, instead of 1.
Option 2
Leave the workspace as is and in the app description include a note that the user will need to run the app separately for each file they wish to upload.
Option 3
In the app description ask the user to zip up all files they wish to upload for processing and modify the workspace so that it first unzips the file before copying all of the contents into the directory the Automation is watching so a separate event is triggered for each file within the zip.
Hi @hollyatsafe ,
Thank you for the options but I think I like my "Option 0" best. Adding extra actions to work processes do not have my preference. I will put an idea on the board for the file/url parameter to be able to handel more than one item.