Alex Rivera | Logout

Content-Transfer-Encoding in file uploading request

Asked 2011-03-02T15:10:02.703
9

I'm trying to upload file, using XMLHTTPRequest, and sending this headers:

Content-Type:multipart/form-data, boundary=xxxxxxxxx

--xxxxxxxxx
Content-Disposition: form-data; name='uploadfile'; filename='123_logo.jpg'
Content-Transfer-Encoding: base64
Content-Type: image/jpeg
/*base64data*/

But on server side PHP ignore header "Content-Transfer-Encoding: base64" and write base64 undecoded data directly into the file!

Is there any way to fix it?

p.s. it is very important to send data using base64

Edit
Report

1 Answer

3

My previous answer was wrong

Content-Transfer-Encoding may appear in the a composite body

http://www.ietf.org/rfc/rfc2616.txt

There are several consequences of this. The entity-body for composite types MAY contain many body-parts, each with its own MIME and HTTP headers (including Content-MD5, Content-Transfer-Encoding, and Content-Encoding headers).

answered 2011-03-02T15:19:33.723

Your Answer