Search…
Uploading with FTP
To upload to an FTP server, you specify the entire target file path and name in the URL, and you specify the local file name to upload with -T, --upload-file. Optionally, you end the target URL with a slash and then the file component from the local path will be appended by curl and used as the remote file name.
Like:
1
curl -T localfile ftp://ftp.example.com/dir/path/remote-file
Copied!
or to use the local file name as the remote name:
1
curl -T localfile ftp://ftp.example.com/dir/path/
Copied!
curl also supports globbing in the -T argument so you can opt to easily upload a range or a series of files:
1
curl -T 'image[1-99].jpg' ftp://ftp.example.com/upload/
Copied!
or
1
curl -T '{Huey,Dewey,Louie}.jpg' ftp://ftp.example.com/nephews/
Copied!
Last modified 17d ago
Export as PDF
Copy link
Edit on GitHub