AnsweredAssumed Answered

cURL working from terminal, but not working in FileMaker

Question asked by AdamSnyder_1 on Jan 29, 2019
Latest reply on Jan 30, 2019 by wimdecorte

I'm trying to upload a file to an api.  The api is a nuxeo server.


I have had success with using curl directly, but have not been able to make it work with either "Insert From URL" script step, or MBS curl functions...


The following curl command works from terminal:

curl -u username:password -X POST -H "X-File-Name:test.psd" -H "X-File-Type:application/photoshop" -T test.psd


Here's the "Insert From URL"  curl options I'm using...  With these options the upload always times out.


"--user name:password " &

"-X POST " &

"-H " & Quote ( "X-File-Name:test.psd" ) & " " &

"-H " & Quote ( "X-File-Type:application/photoshop" ) & " " &

"-H " & Quote ( "Content-Type: application/octet-stream " ) &

"-H " & Quote ( "Content-Length:" & $fileSize ) & " " &

"-T @$image " &

"--trace-ascii $$trace"


When I use MBS, the upload seems to work, but subsequent calls to the api to use the uploaded file fail in strange ways.  It never fails when using curl from terminal.


Does anyone know what I might be doing wrong?