Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upload fixes #491

Merged
merged 2 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@
* [JavaScript and forms](http/post/javascript.md)
* [Multipart formposts](http/post/multipart.md)
* [-d vs -F](http/post/postvspost.md)
* [HTTP PUT](http/put.md)
* [Redirects](http/redirects.md)
* [Customize your HTTP](http/modify/README.md)
* [Request method](http/modify/method.md)
Expand All @@ -180,7 +181,6 @@
* [Ranges](http/modify/ranges.md)
* [Conditionals](http/modify/conditionals.md)
* [Compression](http/modify/compression.md)
* [HTTP PUT](http/put.md)
* [Cookies](http/cookies/README.md)
* [Cookie engine](http/cookies/engine.md)
* [Reading cookies from file](http/cookies/reading.md)
Expand Down
20 changes: 15 additions & 5 deletions usingcurl/uploads.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,6 @@ that becomes the filename used when stored remotely:

curl -T uploadthis ftp://example.com/this/directory/

So if you prefer to select a different filename on the remote side than what
you have used locally, you specify it in the URL:

curl -T uploadthis ftp://example.com/this/directory/remotename

FTP and SFTP also support *appending* to the target file when uploading
instead of overwriting, with the `--append` option:

Expand Down Expand Up @@ -101,3 +96,18 @@ support can output something even for an upload.
Therefore, you may need to explicitly redirect the downloaded data to a file
(using shell redirect '>', `-o` or similar) to get the progress meter
displayed for upload.

## Globbing

curl also supports [globbing](../cmdline/urls/globbing.md) in the `-T`
argument so you can opt to easily upload a range of files:

curl -T 'image[1-99].jpg' ftp://ftp.example.com/upload/

or a series of files:

curl -T '{file1,file2}' https://example.com/upload/

or

curl -T '{Huey,Dewey,Louie}.jpg' ftp://ftp.example.com/nephews/
Loading