Anand kumar
Anand kumar

Reputation: 11

How to upload file to specific folder in destination server using curl?

I have to upload file to specific folder on destination server. How do I pass a folder name as parameter in curl command?

curl -vvv -F "upload_filename=@/Users/example/test"-L http://example.server.com:8080/

Upvotes: 0

Views: 1690

Answers (1)

Marged
Marged

Reputation: 10953

You can't upload to a specific folder on a webserver. If it were a ftp server this would work, but this is a completely different story.

The receiving end on the server (the code that lies behind your root directory, perhaps a index.php or something like this) is in charge of deciding where to put the data it gets.

By using the curl command you provide you will read from the file you specify and post that files content to a webserver.

Upvotes: 2

Related Questions