Skip to main content
Question

Can you Upload FIles to FME Server From a Custom Form?


I have created an FME script that takes a file path as an input and copies it to a folder using the File Copy writer. I have tested it in FME Server and it works.

However, I have a custom web page with an ajax transaction that uses the FMW script in FME Server as the server side program, and this doesn't work. The message says "Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https", although both the HTML page and the FMW script are on the same machine.

Is it possible to upload a file this way, or do I have to use the FME Server interface?

3 replies

darkspatiallord
Forum|alt.badge.img+6

Have you setup CORS on FME Server?


  • April 24, 2018

Yes, CORS is set up with the methods of HEAD, DELETE, POST, GET, OPTIONS, PUT and the default headers of "authorization, cookie, content-disposition, origin, x-requested-with, access-control-request-headers, content-type, access-control-request-method, cache-control, accept". Is there another method/header that I need to add?


  • April 24, 2018

I was able to do it using the sample referenced in the tutorial at https://knowledge.safe.com/articles/583/data-upload-part-3-rest-api.html. Great tutorial.


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