Upload images that are tied to a specific Prototype.
You must have the prototypes
ConventionPrivilege to manage this,
or control an Prototype to manage images specific to that prototype.
Prototype Images are accessed via /api/prototypeimage
.
See "Object Properties" in Introduction for basic shared properties.
Complete details in PrototypeImageProperties. It also has these extra read-only properties:
A link to the location where the image is stored, minus the protocol (ie https).
A link to the location where a thumnail of the image is stored, minus the protocol (ie https).
See "Related Objects" in Introduction for how to use them.
The Prototype this prototype image belongs to.
The services used to fetch and manipulate prototype images.
This will search across all conventions. To search on a single convention see "Relationships" in Convention.
GET /api/prototypeimage
Searches a partial name.
Returns:
{ "paging" : {...}, "items" : [ { "id" : "xxx", "filename" : "pic.jpg", ... }, ... ] }
POST /api/prototypeimage
This is a special field that only exists for uploading the image. It should be an encoded image in the POST body as multipart/form-data
as specified in RFC-2388 (https://tools.ietf.org/html/rfc2388).
When you upload the image it will automatically be resized to 700px wide maintaining its aspect ratio. If you don't want a resize to occur then set this field to 1
.
Returns the same as a normal read.
GET /api/prototypeimage/xxx
Returns:
{ "id" : "xxx", "filename" : "pic.jpg", ... }
PUT /api/prototypeimage/xxx
Returns the same as a normal read.
DELETE /api/prototypeimage/xxx
Returns:
{ "success" : 1 }