Search…
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:
1
GET /orgs/5516ee1b34d8d934281699e3/logo/content
Copied!
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:
1
2
{
3
"object": "facet",
4
"ETag": "594b69d035ac27c2e69ef053082eb6a3",
5
"creator": "5516ee2634d8d93428169c0e",
6
"height": 500,
7
"location": 4,
8
"mime": "image/jpeg",
9
"name": "content",
10
"size": 52586,
11
"state": 2,
12
"url": "https://cdn.medable.com/5516ee1b34d8d93428169/...",
13
"width": 622
14
}
Copied!
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:
1
GET /orgs/5516ee1b34d8d934281699e3/logo
2
{
3
"ETag": "594b69d035ac27c2e69ef053082eb6a3",
4
"creator": "5516ee2634d8d93428169c0e",
5
"facets": [
6
{
7
"ETag": "5046104d05edf82e2a2c0d72118ca15b",
8
"creator": "5516ee2634d8d93428169c0e",
9
"height": 241,
10
"location": 4,
11
"mime": "image/jpeg",
12
"name": "thumbnail",
13
"path": "/orgs/5516ee1b34d8d934281699e3/logo/thumbnail",
14
"size": 16495,
15
"state": 2,
16
"width": 300
17
}
18
],
19
"height": 500,
20
"location": 4,
21
"mime": "image/jpeg",
22
"name": "content",
23
"path": "/orgs/5516ee1b34d8d934281699e3/logo/content",
24
"size": 52586,
25
"state": 2,
26
"width": 622
27
}
Copied!

File States

File content and facets can be in the following states:
State
Name
Description
0
Pending
The facet has been created, and the system is waiting for uploads.
1
Processing
Sources are uploaded and are currently being processed into facets.
2
Ready
The facet is ready for streaming.
3
Error
There was an error processing the facet. A fault property is attached to the facet.
4
Dead
The system will no longer attempt to process this facet. A fault property is attached to the facet.
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

Name
Type
Description
processors
Document Array
Processors specify how your file will be processed. Available processor types are image, overlay, and passthru.
Base property options not available:
  • indexed
  • unique
Last modified 2mo ago
Copy link