Question

How to access file(s) in body of POST request on FME Server?


I would like to use the FME server as middleware to accept files of various formats via a post-request and save them elsewhere. The formats would be mainly pdf, jpg and text based formats (xml, json, etc.) and do not necessarily need to be read in and "understood".

I have therefore used the datafile reader/writer in my workspace as both reader (without input path) and writer. My first approach would have been to store the file temporarily on the FME server in the resources folder and read it in again in a second step. The storing works, but I don't know how to access the filename. Normally I would have the attribute basename exposed and read out via the FileNamePathExtractorm, what does not work here.

My main problems are the following: how do I access filenames in the input if I don't know it in advance? Is there a way to process mulitpart request? And ideally, of course, I would pass the files directly without having to store them on the server.

 

I have already found a few articles on this topic, but they do not fit my use case:

https://community.safe.com/s/article/send-source-data-to-fme-server-with-http-post

https://www.safe.com/training/recorded/fme-server-2019-rest-api-training/

https://community.safe.com/s/article/data-upload-part-3-rest-api


0 replies

Be the first to reply!

Reply