Skip to content

Commit

Permalink
usingcurl/uploads.md: mention --append for FTP and SFTP
Browse files Browse the repository at this point in the history
Fixes #371
  • Loading branch information
bagder committed Jun 17, 2024
1 parent 61554db commit 142dd75
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
5 changes: 5 additions & 0 deletions ftp/upload.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ or to use the local filename as the remote name:

curl -T localfile ftp://ftp.example.com/dir/path/

Append the local file to the target file when uploading instead of
overwriting, with the `--append` option:

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

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

Expand Down
1 change: 1 addition & 0 deletions index-words
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
%{json}
--alt-svc
--anyauth
--append
--basic
--ca-native
--compressed
Expand Down
13 changes: 9 additions & 4 deletions usingcurl/uploads.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ You send off an HTTP upload using the -T option with the file to upload:

curl -T uploadthis http://example.com/

## FTP uploads
## FTP and SFTP uploads

Working with FTP, you get to see the remote file system you are accessing.
You tell the server exactly in which directory you want the upload to be
placed and which filename to use. If you specify the upload URL with a
Working with FTP and SFTP, you get to see the remote file system you are
accessing. You tell the server exactly in which directory you want the upload
to be placed and which filename to use. If you specify the upload URL with a
trailing slash, curl appends the locally used filename to the URL and then
that becomes the filename used when stored remotely:

Expand All @@ -72,6 +72,11 @@ 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:

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

Learn much more about FTPing in the [FTP with curl](../ftp/) section.

## SMTP uploads
Expand Down

0 comments on commit 142dd75

Please sign in to comment.