Skip to main content
Solved

Get a list of filenames based on the user selection?


virtualcitymatt
Celebrity
Forum|alt.badge.img+39

I’m working on an upload process via REST call and I want to use FME to do the upload.

For the API I need to provide a list of file names in advance. I want this to just work and I want to be able to use FME’s multiple file picker to allow the user to pick folders, multipler files or just a single file. etc.

Does anyone have a good/robust method for getting a full list of the files (and filenames) that this input could be.

My initial plan is to split up the input parameter into a list and then figure out what are folders and what are files and for folders I would use a PATH reader to get the files.

I guess I need a “MultiFilePathResolver” kind of thing.

 

Best answer by hkingsbury

I’d go the way you suggested, figure out what are folders, and then find the files in those folders.

I’d want to set a traversal limit, because if someone selected “C:\” then they’re going to be uploading the entire computer

View original
Did this help you find an answer to your question?

2 replies

hkingsbury
Celebrity
Forum|alt.badge.img+55
  • Celebrity
  • Best Answer
  • May 6, 2024

I’d go the way you suggested, figure out what are folders, and then find the files in those folders.

I’d want to set a traversal limit, because if someone selected “C:\” then they’re going to be uploading the entire computer


virtualcitymatt
Celebrity
Forum|alt.badge.img+39
hkingsbury wrote:

I’d go the way you suggested, figure out what are folders, and then find the files in those folders.

I’d want to set a traversal limit, because if someone selected “C:\” then they’re going to be uploading the entire computer

Thanks @hkingsbury , and good tip on the limit. Are you speaking from experience…hehe

 

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings