mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
curl.1: change example for -F
It's a bad idea to send your passwords anywhere, especially over HTTP. Modified example to send a picture instead. Fixes #752
This commit is contained in:
parent
b207ccb104
commit
f07cc91108
@ -634,11 +634,10 @@ the symbol <. The difference between @ and < is then that @ makes a file get
|
|||||||
attached in the post as a file upload, while the < makes a text field and just
|
attached in the post as a file upload, while the < makes a text field and just
|
||||||
get the contents for that text field from a file.
|
get the contents for that text field from a file.
|
||||||
|
|
||||||
Example, to send your password file to the server, where
|
Example: to send an image to a server, where \&'profile' is the name of the
|
||||||
\&'password' is the name of the form-field to which /etc/passwd will be the
|
form-field to which portrait.jpg will be the input:
|
||||||
input:
|
|
||||||
|
|
||||||
\fBcurl\fP -F password=@/etc/passwd www.mypasswords.com
|
\fBcurl\fP -F profile=@portrait.jpg https://example.com/upload.cgi
|
||||||
|
|
||||||
To read content from stdin instead of a file, use - as the filename. This goes
|
To read content from stdin instead of a file, use - as the filename. This goes
|
||||||
for both @ and < constructs. Unfortunately it does not support reading the
|
for both @ and < constructs. Unfortunately it does not support reading the
|
||||||
|
Loading…
Reference in New Issue
Block a user