cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Mime type on uploaded file

From: Zvi Har'El <rl_at_math.technion.ac.il>
Date: Tue, 15 Apr 2003 12:43:40 +0300

On Tue, 15 Apr 2003 11:28:03 +0200, Daniel Stenberg wrote about "Re: Mime type on uploaded file":
> You can set your own Content-Type with curl using a "type=" construct as in:
>
> curl -F "uploadthis=@filename;type=binary/chunk" [url]

This really helped, i.e, I am now using

curl -F uploaded_file=@index.html\;type=text/html http://validator.w3.org/check

for HTML validation. One request: I am using curl 7.10.4, and reading and
rereading the man page, I could fine a reference to "type=" contstruct only for
ftp which enforces ascii transfer if the url ends with ";type=A". I suppose
that the fact one can add a mime type to a -F upload should be documented!

Thanks a million,

Zvi.

-- 
Dr. Zvi Har'El     mailto:rl_at_math.technion.ac.il     Department of Mathematics
tel:+972-54-227607 icq:179294841     Technion - Israel Institute of Technology
fax:+972-4-8293388 http://www.math.technion.ac.il/~rl/     Haifa 32000, ISRAEL
"If you can't say somethin' nice, don't say nothin' at all." -- Thumper (1942)
                                Tuesday, 13 Nisan 5763, 15 April 2003, 12:38PM
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2003-04-15