Welcome to the Filmchief Developer Help Center

API reference, tools and resources for developers

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 those files by their name, which always starts with /files/.protected/.

To retrieve a protected file, you must add an auth parameter to the URL, which can be constructed as follows:

  1. Concatenate the following strings:
    1. Festival identifier: «FESTIVAL IDENTIFIER»
    2. File download key: «FILE DOWNLOAD KEY»
    3. Name of the file without the /files/ prefix, for example: .protected/secret.pdf

      The name must be URL-decoded, for example use foo bar@baz.jpg instead of foo%20bar%40baz.jpg.
      In PHP you can use the rawurldecode function to URL-decode the filename.

  2. The auth parameter value is the MD5 hash of the concatenated string.

Example

To retrieve a protected file named /files/.protected/secret.pdf, the concatenated string would become:

«FESTIVAL IDENTIFIER»«FILE DOWNLOAD KEY».protected/secret.pdf

The MD5 hash of that string is «AUTH KEY». Use this as the auth parameter.

The resulting URL would then be:

https://«FESTIVAL IDENTIFIER».filmchief.com/f/files/.protected/secret.pdf?auth=«AUTH KEY»

This URL grants direct access to the requested file.

If the URL redirects to a sign in page, the auth parameter is probably incorrect. Please carefully review the above instructions, and generate the auth parameter accordingly.

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
{{#files}} {{/files}}