+ Start a Discussion
Sean Williams 21Sean Williams 21 

REST image upload of base64 file not recognised

I am using REST service "/services/data/v41.0/connect/files/users/me" to upload a base64 encoded image file.  The upload works and i can see the file under the Files tab, but it is not recognised as an image file, and when downloaded it is the base64 characters.  It seems the REST upload is not converting the base64 data back into a native png graphics file.

Any idea why or how i solve this?

I am posting these headers and body:

Content-Type: multipart/form-data; boundary=boundary_string

Content-Disposition: form-data; name="entity_content";
Content-Type: application/json

    "title": "sean"

Content-Type: application/octet-stream; charset=ISO-8859-1
Content-Disposition: form-data; name="fileData"; filename="image.png"
Content-Transfer-Encoding: binary

<base64 data here>
Olivier SaierOlivier Saier
it is the actual binary data which should go here, not the base64-encoded.