rest photo upload -> mime_type invalid

snowcrack

Joined: 2011-11-13
Posts: 3
Posted: Sun, 2011-11-13 19:57

hi,

i have a problem with uploading a image over the rest interface. I always get {"mime_type":"invalid"} back.

My http post looks like this:

POST /gallery3/index.php/rest/item/1 HTTP/1.1
Host: www.example.com
Content-Length: 6883
X-Gallery-Request-Method: post
X-Gallery-Request-Key: .......
Content-Type: multipart/form-data; boundary=--------FormData0.9224686087109149

----------FormData0.9224686087109149
Content-Disposition: form-data; name="entity"
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

{"name":"imgTestName1.jpg","type":"photo"}
----------FormData0.9224686087109149
Content-Disposition: form-data; name="file"; filename="imgTestName1.jpg"
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary

ÔøΩÔøΩÔøΩÔøΩJFIFHHÔøΩÔøΩ AppleMark
ÔøΩÔøΩC 

 $.' ",#(7),01444'9=82<.342ÔøΩÔøΩC 

2!!22222222222222222222222222222222222222222222222222ÔøΩÔøΩdd!ÔøΩÔøΩÔøΩÔøΩG !1AQaÔøΩ"236qrÔøΩÔøΩÔøΩ....................
----------FormData0.9224686087109149--

Need some help...

Thanks,
Snowcrack