File access
Getting started
Audience
This article is intended for web developers who have already set up the Filmchief REST API and who need to access to files in a Filmchief database. It is recommended to familiarize yourself with Filmchief from a user's point of view.
Prerequisites
To access files, all you need is a working Filmchief REST API connection.
Basic file access
To access public files, just request https://«FESTIVAL IDENTIFIER».filmchief.com/f/«filename»
, where «filename»
is the name
value of a file that you get from the API.
Please note: name
typically begins with /files/
so don't forget to include that in your URL. For example, to retrieve a file with name /files/example.jpg
, the full URL would be:
https://«FESTIVAL IDENTIFIER».filmchief.com/f/files/example.jpg
Protected files
Certain files are not intended for publication, therefore they are not accessible using the above method. You can recognize these files by their name
, which starts with /files/.protected/
.
To retrieve a protected file, you must add an auth
parameter to the URL, which can be constructed as follows:
- Create a string by concatenating
«FESTIVAL IDENTIFIER»
and«FILE DOWNLOAD KEY»
. - The
auth
parameter value is the MD5 hash of the above string.
For example, to retrieve the protected file /files/.protected/secret.pdf
, the URL would be:
https://«FESTIVAL IDENTIFIER».filmchief.com/f/files/.protected/secret.pdf?auth=«AUTH KEY»
Image operations
The server also accepts a format
parameter, which provides various options to retrieve a scaled or cropped copy of an image, for example:
- Reduced to max. 480 pixels wide:
https://«FESTIVAL IDENTIFIER».filmchief.com/f/«filename»?format=w480
- Reduced to max. 200 pixels tall:
https://«FESTIVAL IDENTIFIER».filmchief.com/f/«filename»?format=h200
Combining multiple format options is also possible, for example:
- Covering a minimal rectangle of 300 x 500 and cropped to 300 x 500:
https://«FESTIVAL IDENTIFIER».filmchief.com/f/«filename»?format=cvw300cvh500crw300crh500
Here is a list of all possible format options:
Option | Meaning | Example |
---|---|---|
w | maxWidth | w480 |
h | maxHeight | h200 |
mw | minWidth | mw480 |
mh | minHeight | mh200 |
cvw | coverWidth | cvw480 |
cvh | coverHeight | cvh200 |
crw | cropWidth | crw480 |
crh | cropHeight | crh200 |
q | quality (10-100) — only applicable to JPG images | q100 |