docs/cmdline: change to .md for cmdline docs
- switch all invidual files documenting command line options into .md,
as the documentation is now markdown-looking.
- made the parser treat 4-space indents as quotes
- switch to building the curl.1 manpage using the "mainpage.idx" file,
which lists the files to include to generate it, instead of using the
previous page-footer/headers. Also, those files are now also .md
ones, using the same format. I gave them underscore prefixes to make
them sort separately:
_NAME.md, _SYNOPSIS.md, _DESCRIPTION.md, _URL.md, _GLOBBING.md,
_VARIABLES.md, _OUTPUT.md, _PROTOCOLS.md, _PROGRESS.md, _VERSION.md,
_OPTIONS.md, _FILES.md, _ENVIRONMENT.md, _PROXYPREFIX.md,
_EXITCODES.md, _BUGS.md, _AUTHORS.md, _WWW.md, _SEEALSO.md
- updated test cases accordingly
Closes #12751
2024-01-21 06:18:43 +08:00
|
|
|
---
|
2023-01-02 20:51:48 +08:00
|
|
|
c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
2022-06-14 06:12:03 +08:00
|
|
|
SPDX-License-Identifier: curl
|
2016-11-16 06:44:58 +08:00
|
|
|
Long: form
|
|
|
|
Short: F
|
|
|
|
Arg: <name=content>
|
2017-09-03 01:17:33 +08:00
|
|
|
Help: Specify multipart MIME data
|
|
|
|
Protocols: HTTP SMTP IMAP
|
2018-05-28 20:17:51 +08:00
|
|
|
Mutexed: data head upload-file
|
2020-07-13 20:15:04 +08:00
|
|
|
Category: http upload
|
2021-09-28 17:50:07 +08:00
|
|
|
Added: 5.0
|
2022-10-18 16:39:43 +08:00
|
|
|
Multi: append
|
docs/cmdline: change to .md for cmdline docs
- switch all invidual files documenting command line options into .md,
as the documentation is now markdown-looking.
- made the parser treat 4-space indents as quotes
- switch to building the curl.1 manpage using the "mainpage.idx" file,
which lists the files to include to generate it, instead of using the
previous page-footer/headers. Also, those files are now also .md
ones, using the same format. I gave them underscore prefixes to make
them sort separately:
_NAME.md, _SYNOPSIS.md, _DESCRIPTION.md, _URL.md, _GLOBBING.md,
_VARIABLES.md, _OUTPUT.md, _PROTOCOLS.md, _PROGRESS.md, _VERSION.md,
_OPTIONS.md, _FILES.md, _ENVIRONMENT.md, _PROXYPREFIX.md,
_EXITCODES.md, _BUGS.md, _AUTHORS.md, _WWW.md, _SEEALSO.md
- updated test cases accordingly
Closes #12751
2024-01-21 06:18:43 +08:00
|
|
|
See-also:
|
|
|
|
- data
|
|
|
|
- form-string
|
|
|
|
- form-escape
|
|
|
|
Example:
|
|
|
|
- --form "name=curl" --form "file=@loadthis" $URL
|
2016-11-16 06:44:58 +08:00
|
|
|
---
|
docs/cmdline: change to .md for cmdline docs
- switch all invidual files documenting command line options into .md,
as the documentation is now markdown-looking.
- made the parser treat 4-space indents as quotes
- switch to building the curl.1 manpage using the "mainpage.idx" file,
which lists the files to include to generate it, instead of using the
previous page-footer/headers. Also, those files are now also .md
ones, using the same format. I gave them underscore prefixes to make
them sort separately:
_NAME.md, _SYNOPSIS.md, _DESCRIPTION.md, _URL.md, _GLOBBING.md,
_VARIABLES.md, _OUTPUT.md, _PROTOCOLS.md, _PROGRESS.md, _VERSION.md,
_OPTIONS.md, _FILES.md, _ENVIRONMENT.md, _PROXYPREFIX.md,
_EXITCODES.md, _BUGS.md, _AUTHORS.md, _WWW.md, _SEEALSO.md
- updated test cases accordingly
Closes #12751
2024-01-21 06:18:43 +08:00
|
|
|
|
|
|
|
# `--form`
|
|
|
|
|
2024-03-12 17:34:58 +08:00
|
|
|
For the HTTP protocol family, emulate a filled-in form in which a user has
|
|
|
|
pressed the submit button. This makes curl POST data using the Content-Type
|
|
|
|
multipart/form-data according to RFC 2388.
|
2017-09-03 01:17:33 +08:00
|
|
|
|
2024-03-12 17:34:58 +08:00
|
|
|
For SMTP and IMAP protocols, this composes a multipart mail message to
|
|
|
|
transmit.
|
2017-09-03 01:17:33 +08:00
|
|
|
|
2018-02-22 15:28:05 +08:00
|
|
|
This enables uploading of binary files etc. To force the 'content' part to be
|
2024-02-27 17:35:28 +08:00
|
|
|
a file, prefix the filename with an @ sign. To just get the content part from
|
2024-02-28 18:40:04 +08:00
|
|
|
a file, prefix the filename with 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 get the contents for that text field
|
|
|
|
from a file.
|
2016-11-16 06:44:58 +08:00
|
|
|
|
2024-03-12 17:34:58 +08:00
|
|
|
Read content from stdin instead of a file by using a single "-" as filename.
|
|
|
|
This goes for both @ and \< constructs. When stdin is used, the contents is
|
|
|
|
buffered in memory first by curl to determine its size and allow a possible
|
|
|
|
resend. Defining a part's data from a named non-regular file (such as a named
|
|
|
|
pipe or similar) is not subject to buffering and is instead read at
|
2023-09-08 20:32:29 +08:00
|
|
|
transmission time; since the full size is unknown before the transfer starts,
|
|
|
|
such data is sent as chunks by HTTP and rejected by IMAP.
|
2018-02-22 15:28:05 +08:00
|
|
|
|
2022-08-23 19:42:49 +08:00
|
|
|
Example: send an image to an HTTP server, where 'profile' is the name of the
|
2023-09-08 20:32:29 +08:00
|
|
|
form-field to which the file **portrait.jpg** is the input:
|
2016-11-16 06:44:58 +08:00
|
|
|
|
docs/cmdline: change to .md for cmdline docs
- switch all invidual files documenting command line options into .md,
as the documentation is now markdown-looking.
- made the parser treat 4-space indents as quotes
- switch to building the curl.1 manpage using the "mainpage.idx" file,
which lists the files to include to generate it, instead of using the
previous page-footer/headers. Also, those files are now also .md
ones, using the same format. I gave them underscore prefixes to make
them sort separately:
_NAME.md, _SYNOPSIS.md, _DESCRIPTION.md, _URL.md, _GLOBBING.md,
_VARIABLES.md, _OUTPUT.md, _PROTOCOLS.md, _PROGRESS.md, _VERSION.md,
_OPTIONS.md, _FILES.md, _ENVIRONMENT.md, _PROXYPREFIX.md,
_EXITCODES.md, _BUGS.md, _AUTHORS.md, _WWW.md, _SEEALSO.md
- updated test cases accordingly
Closes #12751
2024-01-21 06:18:43 +08:00
|
|
|
curl -F profile=@portrait.jpg https://example.com/upload.cgi
|
2016-11-16 06:44:58 +08:00
|
|
|
|
2020-01-23 16:24:30 +08:00
|
|
|
Example: send your name and shoe size in two text fields to the server:
|
2018-02-22 15:28:05 +08:00
|
|
|
|
docs/cmdline: change to .md for cmdline docs
- switch all invidual files documenting command line options into .md,
as the documentation is now markdown-looking.
- made the parser treat 4-space indents as quotes
- switch to building the curl.1 manpage using the "mainpage.idx" file,
which lists the files to include to generate it, instead of using the
previous page-footer/headers. Also, those files are now also .md
ones, using the same format. I gave them underscore prefixes to make
them sort separately:
_NAME.md, _SYNOPSIS.md, _DESCRIPTION.md, _URL.md, _GLOBBING.md,
_VARIABLES.md, _OUTPUT.md, _PROTOCOLS.md, _PROGRESS.md, _VERSION.md,
_OPTIONS.md, _FILES.md, _ENVIRONMENT.md, _PROXYPREFIX.md,
_EXITCODES.md, _BUGS.md, _AUTHORS.md, _WWW.md, _SEEALSO.md
- updated test cases accordingly
Closes #12751
2024-01-21 06:18:43 +08:00
|
|
|
curl -F name=John -F shoesize=11 https://example.com/
|
2018-02-22 15:28:05 +08:00
|
|
|
|
2020-01-23 16:24:30 +08:00
|
|
|
Example: send your essay in a text field to the server. Send it as a plain
|
2018-02-22 15:28:05 +08:00
|
|
|
text field, but get the contents for it from a local file:
|
|
|
|
|
docs/cmdline: change to .md for cmdline docs
- switch all invidual files documenting command line options into .md,
as the documentation is now markdown-looking.
- made the parser treat 4-space indents as quotes
- switch to building the curl.1 manpage using the "mainpage.idx" file,
which lists the files to include to generate it, instead of using the
previous page-footer/headers. Also, those files are now also .md
ones, using the same format. I gave them underscore prefixes to make
them sort separately:
_NAME.md, _SYNOPSIS.md, _DESCRIPTION.md, _URL.md, _GLOBBING.md,
_VARIABLES.md, _OUTPUT.md, _PROTOCOLS.md, _PROGRESS.md, _VERSION.md,
_OPTIONS.md, _FILES.md, _ENVIRONMENT.md, _PROXYPREFIX.md,
_EXITCODES.md, _BUGS.md, _AUTHORS.md, _WWW.md, _SEEALSO.md
- updated test cases accordingly
Closes #12751
2024-01-21 06:18:43 +08:00
|
|
|
curl -F "story=<hugefile.txt" https://example.com/
|
2016-11-16 06:44:58 +08:00
|
|
|
|
2024-03-12 17:34:58 +08:00
|
|
|
You can also instruct curl what Content-Type to use by using `type=`, in a
|
|
|
|
manner similar to:
|
2016-11-16 06:44:58 +08:00
|
|
|
|
docs/cmdline: change to .md for cmdline docs
- switch all invidual files documenting command line options into .md,
as the documentation is now markdown-looking.
- made the parser treat 4-space indents as quotes
- switch to building the curl.1 manpage using the "mainpage.idx" file,
which lists the files to include to generate it, instead of using the
previous page-footer/headers. Also, those files are now also .md
ones, using the same format. I gave them underscore prefixes to make
them sort separately:
_NAME.md, _SYNOPSIS.md, _DESCRIPTION.md, _URL.md, _GLOBBING.md,
_VARIABLES.md, _OUTPUT.md, _PROTOCOLS.md, _PROGRESS.md, _VERSION.md,
_OPTIONS.md, _FILES.md, _ENVIRONMENT.md, _PROXYPREFIX.md,
_EXITCODES.md, _BUGS.md, _AUTHORS.md, _WWW.md, _SEEALSO.md
- updated test cases accordingly
Closes #12751
2024-01-21 06:18:43 +08:00
|
|
|
curl -F "web=@index.html;type=text/html" example.com
|
2016-11-16 06:44:58 +08:00
|
|
|
|
|
|
|
or
|
|
|
|
|
docs/cmdline: change to .md for cmdline docs
- switch all invidual files documenting command line options into .md,
as the documentation is now markdown-looking.
- made the parser treat 4-space indents as quotes
- switch to building the curl.1 manpage using the "mainpage.idx" file,
which lists the files to include to generate it, instead of using the
previous page-footer/headers. Also, those files are now also .md
ones, using the same format. I gave them underscore prefixes to make
them sort separately:
_NAME.md, _SYNOPSIS.md, _DESCRIPTION.md, _URL.md, _GLOBBING.md,
_VARIABLES.md, _OUTPUT.md, _PROTOCOLS.md, _PROGRESS.md, _VERSION.md,
_OPTIONS.md, _FILES.md, _ENVIRONMENT.md, _PROXYPREFIX.md,
_EXITCODES.md, _BUGS.md, _AUTHORS.md, _WWW.md, _SEEALSO.md
- updated test cases accordingly
Closes #12751
2024-01-21 06:18:43 +08:00
|
|
|
curl -F "name=daniel;type=text/foo" example.com
|
2016-11-16 06:44:58 +08:00
|
|
|
|
|
|
|
You can also explicitly change the name field of a file upload part by setting
|
|
|
|
filename=, like this:
|
|
|
|
|
docs/cmdline: change to .md for cmdline docs
- switch all invidual files documenting command line options into .md,
as the documentation is now markdown-looking.
- made the parser treat 4-space indents as quotes
- switch to building the curl.1 manpage using the "mainpage.idx" file,
which lists the files to include to generate it, instead of using the
previous page-footer/headers. Also, those files are now also .md
ones, using the same format. I gave them underscore prefixes to make
them sort separately:
_NAME.md, _SYNOPSIS.md, _DESCRIPTION.md, _URL.md, _GLOBBING.md,
_VARIABLES.md, _OUTPUT.md, _PROTOCOLS.md, _PROGRESS.md, _VERSION.md,
_OPTIONS.md, _FILES.md, _ENVIRONMENT.md, _PROXYPREFIX.md,
_EXITCODES.md, _BUGS.md, _AUTHORS.md, _WWW.md, _SEEALSO.md
- updated test cases accordingly
Closes #12751
2024-01-21 06:18:43 +08:00
|
|
|
curl -F "file=@localfile;filename=nameinpost" example.com
|
2016-11-16 06:44:58 +08:00
|
|
|
|
|
|
|
If filename/path contains ',' or ';', it must be quoted by double-quotes like:
|
|
|
|
|
docs/cmdline: change to .md for cmdline docs
- switch all invidual files documenting command line options into .md,
as the documentation is now markdown-looking.
- made the parser treat 4-space indents as quotes
- switch to building the curl.1 manpage using the "mainpage.idx" file,
which lists the files to include to generate it, instead of using the
previous page-footer/headers. Also, those files are now also .md
ones, using the same format. I gave them underscore prefixes to make
them sort separately:
_NAME.md, _SYNOPSIS.md, _DESCRIPTION.md, _URL.md, _GLOBBING.md,
_VARIABLES.md, _OUTPUT.md, _PROTOCOLS.md, _PROGRESS.md, _VERSION.md,
_OPTIONS.md, _FILES.md, _ENVIRONMENT.md, _PROXYPREFIX.md,
_EXITCODES.md, _BUGS.md, _AUTHORS.md, _WWW.md, _SEEALSO.md
- updated test cases accordingly
Closes #12751
2024-01-21 06:18:43 +08:00
|
|
|
curl -F "file=@\"local,file\";filename=\"name;in;post\"" example.com
|
2016-11-16 06:44:58 +08:00
|
|
|
|
|
|
|
or
|
|
|
|
|
docs/cmdline: change to .md for cmdline docs
- switch all invidual files documenting command line options into .md,
as the documentation is now markdown-looking.
- made the parser treat 4-space indents as quotes
- switch to building the curl.1 manpage using the "mainpage.idx" file,
which lists the files to include to generate it, instead of using the
previous page-footer/headers. Also, those files are now also .md
ones, using the same format. I gave them underscore prefixes to make
them sort separately:
_NAME.md, _SYNOPSIS.md, _DESCRIPTION.md, _URL.md, _GLOBBING.md,
_VARIABLES.md, _OUTPUT.md, _PROTOCOLS.md, _PROGRESS.md, _VERSION.md,
_OPTIONS.md, _FILES.md, _ENVIRONMENT.md, _PROXYPREFIX.md,
_EXITCODES.md, _BUGS.md, _AUTHORS.md, _WWW.md, _SEEALSO.md
- updated test cases accordingly
Closes #12751
2024-01-21 06:18:43 +08:00
|
|
|
curl -F 'file=@"local,file";filename="name;in;post"' example.com
|
2016-11-16 06:44:58 +08:00
|
|
|
|
|
|
|
Note that if a filename/path is quoted by double-quotes, any double-quote
|
|
|
|
or backslash within the filename must be escaped by backslash.
|
|
|
|
|
2017-10-29 20:57:16 +08:00
|
|
|
Quoting must also be applied to non-file data if it contains semicolons,
|
|
|
|
leading/trailing spaces or leading double quotes:
|
|
|
|
|
docs/cmdline: change to .md for cmdline docs
- switch all invidual files documenting command line options into .md,
as the documentation is now markdown-looking.
- made the parser treat 4-space indents as quotes
- switch to building the curl.1 manpage using the "mainpage.idx" file,
which lists the files to include to generate it, instead of using the
previous page-footer/headers. Also, those files are now also .md
ones, using the same format. I gave them underscore prefixes to make
them sort separately:
_NAME.md, _SYNOPSIS.md, _DESCRIPTION.md, _URL.md, _GLOBBING.md,
_VARIABLES.md, _OUTPUT.md, _PROTOCOLS.md, _PROGRESS.md, _VERSION.md,
_OPTIONS.md, _FILES.md, _ENVIRONMENT.md, _PROXYPREFIX.md,
_EXITCODES.md, _BUGS.md, _AUTHORS.md, _WWW.md, _SEEALSO.md
- updated test cases accordingly
Closes #12751
2024-01-21 06:18:43 +08:00
|
|
|
curl -F 'colors="red; green; blue";type=text/x-myapp' example.com
|
2017-10-29 20:57:16 +08:00
|
|
|
|
2017-09-03 01:17:33 +08:00
|
|
|
You can add custom headers to the field by setting headers=, like
|
|
|
|
|
docs/cmdline: change to .md for cmdline docs
- switch all invidual files documenting command line options into .md,
as the documentation is now markdown-looking.
- made the parser treat 4-space indents as quotes
- switch to building the curl.1 manpage using the "mainpage.idx" file,
which lists the files to include to generate it, instead of using the
previous page-footer/headers. Also, those files are now also .md
ones, using the same format. I gave them underscore prefixes to make
them sort separately:
_NAME.md, _SYNOPSIS.md, _DESCRIPTION.md, _URL.md, _GLOBBING.md,
_VARIABLES.md, _OUTPUT.md, _PROTOCOLS.md, _PROGRESS.md, _VERSION.md,
_OPTIONS.md, _FILES.md, _ENVIRONMENT.md, _PROXYPREFIX.md,
_EXITCODES.md, _BUGS.md, _AUTHORS.md, _WWW.md, _SEEALSO.md
- updated test cases accordingly
Closes #12751
2024-01-21 06:18:43 +08:00
|
|
|
curl -F "submit=OK;headers=\"X-submit-type: OK\"" example.com
|
2017-09-03 01:17:33 +08:00
|
|
|
|
|
|
|
or
|
|
|
|
|
docs/cmdline: change to .md for cmdline docs
- switch all invidual files documenting command line options into .md,
as the documentation is now markdown-looking.
- made the parser treat 4-space indents as quotes
- switch to building the curl.1 manpage using the "mainpage.idx" file,
which lists the files to include to generate it, instead of using the
previous page-footer/headers. Also, those files are now also .md
ones, using the same format. I gave them underscore prefixes to make
them sort separately:
_NAME.md, _SYNOPSIS.md, _DESCRIPTION.md, _URL.md, _GLOBBING.md,
_VARIABLES.md, _OUTPUT.md, _PROTOCOLS.md, _PROGRESS.md, _VERSION.md,
_OPTIONS.md, _FILES.md, _ENVIRONMENT.md, _PROXYPREFIX.md,
_EXITCODES.md, _BUGS.md, _AUTHORS.md, _WWW.md, _SEEALSO.md
- updated test cases accordingly
Closes #12751
2024-01-21 06:18:43 +08:00
|
|
|
curl -F "submit=OK;headers=@headerfile" example.com
|
2017-09-03 01:17:33 +08:00
|
|
|
|
|
|
|
The headers= keyword may appear more that once and above notes about quoting
|
|
|
|
apply. When headers are read from a file, Empty lines and lines starting
|
|
|
|
with '#' are comments and ignored; each header can be folded by splitting
|
|
|
|
between two words and starting the continuation line with a space; embedded
|
|
|
|
carriage-returns and trailing spaces are stripped.
|
|
|
|
Here is an example of a header file contents:
|
|
|
|
|
docs/cmdline: change to .md for cmdline docs
- switch all invidual files documenting command line options into .md,
as the documentation is now markdown-looking.
- made the parser treat 4-space indents as quotes
- switch to building the curl.1 manpage using the "mainpage.idx" file,
which lists the files to include to generate it, instead of using the
previous page-footer/headers. Also, those files are now also .md
ones, using the same format. I gave them underscore prefixes to make
them sort separately:
_NAME.md, _SYNOPSIS.md, _DESCRIPTION.md, _URL.md, _GLOBBING.md,
_VARIABLES.md, _OUTPUT.md, _PROTOCOLS.md, _PROGRESS.md, _VERSION.md,
_OPTIONS.md, _FILES.md, _ENVIRONMENT.md, _PROXYPREFIX.md,
_EXITCODES.md, _BUGS.md, _AUTHORS.md, _WWW.md, _SEEALSO.md
- updated test cases accordingly
Closes #12751
2024-01-21 06:18:43 +08:00
|
|
|
# This file contain two headers.
|
|
|
|
X-header-1: this is a header
|
2017-09-03 01:17:33 +08:00
|
|
|
|
docs/cmdline: change to .md for cmdline docs
- switch all invidual files documenting command line options into .md,
as the documentation is now markdown-looking.
- made the parser treat 4-space indents as quotes
- switch to building the curl.1 manpage using the "mainpage.idx" file,
which lists the files to include to generate it, instead of using the
previous page-footer/headers. Also, those files are now also .md
ones, using the same format. I gave them underscore prefixes to make
them sort separately:
_NAME.md, _SYNOPSIS.md, _DESCRIPTION.md, _URL.md, _GLOBBING.md,
_VARIABLES.md, _OUTPUT.md, _PROTOCOLS.md, _PROGRESS.md, _VERSION.md,
_OPTIONS.md, _FILES.md, _ENVIRONMENT.md, _PROXYPREFIX.md,
_EXITCODES.md, _BUGS.md, _AUTHORS.md, _WWW.md, _SEEALSO.md
- updated test cases accordingly
Closes #12751
2024-01-21 06:18:43 +08:00
|
|
|
# The following header is folded.
|
|
|
|
X-header-2: this is
|
|
|
|
another header
|
2017-09-03 01:17:33 +08:00
|
|
|
|
|
|
|
To support sending multipart mail messages, the syntax is extended as follows:
|
2023-12-16 18:46:31 +08:00
|
|
|
|
2017-09-03 01:17:33 +08:00
|
|
|
- name can be omitted: the equal sign is the first character of the argument,
|
2023-12-16 18:46:31 +08:00
|
|
|
|
2017-09-03 01:17:33 +08:00
|
|
|
- if data starts with '(', this signals to start a new multipart: it can be
|
|
|
|
followed by a content type specification.
|
2023-12-16 18:46:31 +08:00
|
|
|
|
2017-09-03 01:17:33 +08:00
|
|
|
- a multipart can be terminated with a '=)' argument.
|
|
|
|
|
2021-12-17 18:02:18 +08:00
|
|
|
Example: the following command sends an SMTP mime email consisting in an
|
2017-09-03 01:17:33 +08:00
|
|
|
inline part in two alternative formats: plain text and HTML. It attaches a
|
|
|
|
text file:
|
|
|
|
|
docs/cmdline: change to .md for cmdline docs
- switch all invidual files documenting command line options into .md,
as the documentation is now markdown-looking.
- made the parser treat 4-space indents as quotes
- switch to building the curl.1 manpage using the "mainpage.idx" file,
which lists the files to include to generate it, instead of using the
previous page-footer/headers. Also, those files are now also .md
ones, using the same format. I gave them underscore prefixes to make
them sort separately:
_NAME.md, _SYNOPSIS.md, _DESCRIPTION.md, _URL.md, _GLOBBING.md,
_VARIABLES.md, _OUTPUT.md, _PROTOCOLS.md, _PROGRESS.md, _VERSION.md,
_OPTIONS.md, _FILES.md, _ENVIRONMENT.md, _PROXYPREFIX.md,
_EXITCODES.md, _BUGS.md, _AUTHORS.md, _WWW.md, _SEEALSO.md
- updated test cases accordingly
Closes #12751
2024-01-21 06:18:43 +08:00
|
|
|
curl -F '=(;type=multipart/alternative' \
|
|
|
|
-F '=plain text message' \
|
|
|
|
-F '= <body>HTML message</body>;type=text/html' \
|
|
|
|
-F '=)' -F '=@textfile.txt' ... smtp://example.com
|
2017-09-03 01:17:33 +08:00
|
|
|
|
2017-09-06 00:11:59 +08:00
|
|
|
Data can be encoded for transfer using encoder=. Available encodings are
|
2021-03-22 23:50:57 +08:00
|
|
|
*binary* and *8bit* that do nothing else than adding the corresponding
|
|
|
|
Content-Transfer-Encoding header, *7bit* that only rejects 8-bit characters
|
|
|
|
with a transfer error, *quoted-printable* and *base64* that encodes data
|
|
|
|
according to the corresponding schemes, limiting lines length to 76
|
|
|
|
characters.
|
2017-09-06 00:11:59 +08:00
|
|
|
|
|
|
|
Example: send multipart mail with a quoted-printable text message and a
|
|
|
|
base64 attached file:
|
|
|
|
|
docs/cmdline: change to .md for cmdline docs
- switch all invidual files documenting command line options into .md,
as the documentation is now markdown-looking.
- made the parser treat 4-space indents as quotes
- switch to building the curl.1 manpage using the "mainpage.idx" file,
which lists the files to include to generate it, instead of using the
previous page-footer/headers. Also, those files are now also .md
ones, using the same format. I gave them underscore prefixes to make
them sort separately:
_NAME.md, _SYNOPSIS.md, _DESCRIPTION.md, _URL.md, _GLOBBING.md,
_VARIABLES.md, _OUTPUT.md, _PROTOCOLS.md, _PROGRESS.md, _VERSION.md,
_OPTIONS.md, _FILES.md, _ENVIRONMENT.md, _PROXYPREFIX.md,
_EXITCODES.md, _BUGS.md, _AUTHORS.md, _WWW.md, _SEEALSO.md
- updated test cases accordingly
Closes #12751
2024-01-21 06:18:43 +08:00
|
|
|
curl -F '=text message;encoder=quoted-printable' \
|
|
|
|
-F '=@localfile;encoder=base64' ... smtp://example.com
|
2017-09-06 00:11:59 +08:00
|
|
|
|
2016-11-16 06:44:58 +08:00
|
|
|
See further examples and details in the MANUAL.
|