Create photo REST API - problem with special characters

snowcrack

Joined: 2011-11-13
Posts: 3
Posted: Mon, 2012-01-30 17:35

Hello,

i have a problem when I sending photos with special characters in title or description over the REST API.

For example, when I send title "123ÄaÖ" I will get "123a" as title in my gallery.

Here is an example POST:

POST /gallery3/index.php/rest/item/1 HTTP/1.1
Host: www.example.com
Content-Length: 28897
Accept: */*
X-Gallery-Request-Method: post
Origin: file://
X-Gallery-Request-Key: c6a3c922e371007af6fb60af6ffd86c6
Content-Type: multipart/form-data; charset=UTF-8; boundary=--gallery0.3254501086194068
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Cookie: g3sid=532bfbf0e6fe23481a837620bcf8394fc0e2d64e%7Efeb696c1e0aed77457f2b785b88df667; ZIKULASID2=6426b022b82f0fa58f1acc7b0d5d6b970ae2ea4a
Connection: keep-alive

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

{"type":"photo","name":"GalleryImage.jpg","title":"123ÄaÖ","description":""}
----gallery0.3254501086194068
Content-Disposition: form-data; name="file"; filename="GalleryImage.jpg"
Content-Type: application/octet-stream

...

Thanks,
Snowcrack