0

I have noticed that my application on Ubuntu 18 is not uploading files to remote server which was working ok on Ubuntu 16.

When I do trace I see only one difference.

Ubuntu 16: Content-Disposition: form-data

Ubuntu 18: Content-Disposition: attachment

Curl command:

curl --trace-ascii - -XPOST -u user:password  -H 'Content-Type: multipart/mixed' \
    -H 'If-Match: '"e4a49f13"'' -F 'file-delete={"delete":[]};type=application/json' \
    -F 'file-put-1=@test.txt;filename=destinationFile.txt;type=text/plain' \
    'http://192.168.1.20:8081/applications/14837348?content=RAW'

Versions: Ubuntu 16: curl 7.47.0 Ubuntu 18: curl 7.58.0

I have tried also to install from source https://github.com/curl/curl.git

Found this reported issue: https://github.com/curl/curl/issues/5256

Thank you all for help

iWizard
  • 398
  • 2
  • 10
  • 26

1 Answers1

0

Can try the following command to upload file to a remote server provided the necessary authentication is assigned

curl -F ‘data=local file path’ Destination address

Same -F option can be provided to upload multiple files.

try this, if not working let me know

Ryan
  • 107
  • 4