File
Property Type: file
File types store binary data such as images or video. Each File type can be configured with multiple processors, which create streamable, named facets. Every File property has a default content facet at its root.
Streaming files is done in one of two ways, both of which begin by directly accessing a named facet using the path to the file property plus the facet name. For example, the Organization logo content can be accessed as follows:
The response depends on the value of the HTTP accept
request header. If the header begins with application/json
, the response is a json document containing a secure url
property to the file stream:
If the accept header does not begin with application/json, the request will result in a 302 Found
, with the Location
response header having been set to the above url
property.
In cases where it's not possible to include HTTP request headers, such as an image tag, the Medable-Client-Key may be placed in the url as a query argument.
The Organization logo
File property has a thumbnail
facet, which can be accessed in much the same way, replacing content with thumbnail (GET /orgs/5516ee1b34d8d934281699e3/logo/thumbnail
).
Reading a File without requesting a stream retrieves all of the File's facet information, which includes the root content and any available facets:
File States
File content and facets can be in the following states:
Requests for facets that are still in a pending or processing will result in a 202 kMediaNotReady
fault. Clients should try again after a time. File processing time depends on the file size, type, number and type of facets, the and the facet storage location.
Private facets are only readable by the facet creator. As such, the uploaded content is completely isolated from view by other users, but can still be used as input to another process. The Conversation attachments
File array is configured in this fashion, having a content facet that is configured to use an overlay png, combining it with a private original to produce a final image that is anonymized.
See File Uploads to find out how to upload media content.
Property Options
Base property options not available:
indexed
unique
Last updated