0

I need to move a large file from a Unix server to a cloud storage service. The service doesn't provide any FTP or API to upload files. The only way to upload a file is to authenticate (username and password) and complete a simple form:

enter image description here

Once authenticated, to upload and submit the file I need to

  1. Fill a compulsory form (Enter delivery email address(es))
  2. Click on Browse...
  3. Locate the file in my computer file system
  4. Click the big Send button

Would that be possible from command line with cURL?

1 Answer 1

1

You need the endpoint that gets called when you click on Send. Also specify that it is multipart/form-data since you have both regular post parameters and a file.

curl -X POST [http://endpoint] -F "[email protected]" -F "image=@/home/Downloads/test.jpg" 
Sign up to request clarification or add additional context in comments.

1 Comment

How do I authenticate?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.