/put

The eas/put endpoint is used to synchronously upload files.

Differs from easydb 5: easydb 5 eas/put accepts a single file per request ("one request must not contain more than one file upload form field"); fylr accepts multiple files in one request (the references / filenames parameters are arrays). Also, easydb 5 reports a missing user as 400 ("not authenticated"); fylr rejects it with 401 (UserRequired).

POST /eas/put

post

Endpoint to upload one or multiple files. PUT and POST are identical.

Authorizations
AuthorizationstringRequired

Access token in the Authorization header: Authorization: Bearer <token>.

Query parameters
referencesstring · jsonOptional

Array of string with a list of references corresponding to each file. File references are unique across all files.

filenamesstring · jsonOptional

Array of string with a list of filenames corresponding to each file. If a filename is a non empty string, the filename delivered by the multi-part is overwritten.

produce_versionsstring · jsonOptional

Array of boolean with a list of values corresponding to each file. If set to true, fylr produces renditions for each file uploaded, if set to false, no versions are produced. If no values is given (no parameter set or less values than needed), true is assumed.

id_parentsstring · jsonOptional

Array of integer with a list of parent ids. A parent id must be set for manual rendition uploads when using version_names. The id must point to a file "original".

version_namesstring · jsonOptional

Array of string with a list of version names corresponding to each file. If a version name is given, the upload is meant to be a manual rendition. As such, the id_parents must be given alongside with it. The referenced parent files must be original and have set their produce_versions to false. Version names must be unique for all manually uploaded versions.

custom_produce_configsstring · jsonOptional

Array of custom produce config definitions as used in POST /api/v1/eas/{fileId}.

prioritynumber · int64Optional

When adding the renditions job to the file worker queue a priority is used. Set 2 for interactive, 4 for highest and 0 for normal.

Default: 0
collectionnumber · int64Optional

Collection is the id of a collection the uploaded files should be linked into. This works like the hotfolder upload into a collection. The collection needs to be configured as upload collection. The _linked_objects property will be set in the response with informations about the created or updated objects the files have been linked to.

check_for_duplicatesbooleanOptional

If set, the fylr database is queried for duplicates of the file. The _duplicate property will be added to the response.

Body
filestring · binaryOptional

The file to upload. The filename parameter from the Content-Disposition header will be used as the file name. Only the base part of the filename is used. The parsing of the path is platform-dependent. The user needs the right to upload a file into the specific class in any of the rights configuration.

Responses
200

Upload was successful.

application/json
object[]Optional

The file rendered in long format.

PUT /eas/put

put

Endpoint to upload one or multiple files. PUT and POST are identical.

Authorizations
AuthorizationstringRequired

Access token in the Authorization header: Authorization: Bearer <token>.

Query parameters
referencesstring · jsonOptional

Array of string with a list of references corresponding to each file. File references are unique across all files.

filenamesstring · jsonOptional

Array of string with a list of filenames corresponding to each file. If a filename is a non empty string, the filename delivered by the multi-part is overwritten.

produce_versionsstring · jsonOptional

Array of boolean with a list of values corresponding to each file. If set to true, fylr produces renditions for each file uploaded, if set to false, no versions are produced. If no values is given (no parameter set or less values than needed), true is assumed.

id_parentsstring · jsonOptional

Array of integer with a list of parent ids. A parent id must be set for manual rendition uploads when using version_names. The id must point to a file "original".

version_namesstring · jsonOptional

Array of string with a list of version names corresponding to each file. If a version name is given, the upload is meant to be a manual rendition. As such, the id_parents must be given alongside with it. The referenced parent files must be original and have set their produce_versions to false. Version names must be unique for all manually uploaded versions.

custom_produce_configsstring · jsonOptional

Array of custom produce config definitions as used in POST /api/v1/eas/{fileId}.

prioritynumber · int64Optional

When adding the renditions job to the file worker queue a priority is used. Set 2 for interactive, 4 for highest and 0 for normal.

Default: 0
collectionnumber · int64Optional

Collection is the id of a collection the uploaded files should be linked into. This works like the hotfolder upload into a collection. The collection needs to be configured as upload collection. The _linked_objects property will be set in the response with informations about the created or updated objects the files have been linked to.

check_for_duplicatesbooleanOptional

If set, the fylr database is queried for duplicates of the file. The _duplicate property will be added to the response.

Body
filestring · binaryOptional

The file to upload. The filename parameter from the Content-Disposition header will be used as the file name. Only the base part of the filename is used. The parsing of the path is platform-dependent. The user needs the right to upload a file into the specific class in any of the rights configuration.

Responses
200

Upload was successful.

application/json
object[]Optional

The file rendered in long format.

Last updated