Upload Photo Via Multipart Form Data
This example request illustrates how to upload a photo via multipart form data. This is the mechanism you would use from a browser-based client. To do this, post the photo to the Memories resource with the Content-Type
set to multipart/form-data
. Provide the description of each resource in the first part. Include the title and the qualifiers and any other metadata. Provide the images in each subsequent part with the Content-Type
set to image/jpeg
.
Request
POST /platform/memories/memories Content-Type: multipart/form-data; boundary=Boundary_2_bHash_bTimestamp Authorization: Bearer YOUR_ACCESS_TOKEN_HERE MIME-Version: 1.0 --Boundary_2_bHash_bTimestamp Content-Type: text/plain Content-Disposition: form-data; name="title" Missionary Portrait --Boundary_2_bHash_bTimestamp Content-Type: image/jpeg Content-Disposition: form-data; filename="alma-mission.jpg"; name="artifact" ...(binary bytes of the image)... --Boundary_2_bHash_bTimestamp--
Response
HTTP/1.1 201 Created Content-type: text/html X-entity-id: 12345 X-processing-time: 3 Vary: Accept,Accept-Language,Accept-Encoding,Expect Date: Sun, 03 Apr 1836 10:00:00 GMT-5 Cache-control: no-cache, no-store, no-transform, must-revalidate, max-age=0 Location: https://api.familysearch.org/platform/memories/memories/12345 Transfer-encoding: chunked
Sending...
Feedback was sent.
Can't send feedback. Retry in 5 seconds.