Hi,
I try to upload a file to the FME Flow Shared Resource Folder via the Flow REST API. When I use Postman the request works as expected but I need to send the request in a command prompt with curl. Of course, first I tried to use the curl that can be generated in Postman but it always returns the error “curl: (26) Failed to open/read local data from file/application.
Here are the paramters for the working upload in Postman:
- POST
- Headers
- Authorization: fmetoken token=1234
- Body (form-data)
- file: test_upload.txt
Postman generates the following curl:
curl --location 'https://fmeflow/fmerest/v3/resources/connections/FME_SHAREDRESOURCE_DATA/filesys/Test' --header 'Authorization: fmetoken token=1234' --form 'file=@"/C:/Users/e059231a/Downloads/test_upload.txt"'
I already tried to remove the quotes from the filename and to replace the slashes with double backslashes but still get the mentioned error.