upload.ospp

File upload

Define an upload entry point to upload/download from a storage endpoint.

This allows to define boundaries to limit the files that are authorized or not into the storage. Available settings are:

  • max size limits for an individual file

  • allowed file types (image/png, application/pdf, …)

type

object

properties

  • authorizedContentTypes

List of authorized content type. Must at least contain one element.

type

array

items

type

string

  • batchSize

Number of upload requests that can be performed at the same time (default 1).

This only concerns requests from the front-end as web browsers might limit simultaneous requests to a single domain. Extra requests are queued until a connection opens which could lead to timeout errors.

Default value is [1]

type

integer

minimum

1

default

1

  • isTemplateGeneratedByOspComposer

Name of the playbook that generated this file. If present, the file is managed by the Composer and may be overwritten on regeneration. Used for selective clean. Do not edit or set manually.

type

string

  • maxSize

Max size allowed for each individual file (default 5 MB)

Default value is [5000000]

type

integer

minimum

1

default

5000000

  • moduleId

The id of the module who need this configuration. Supported module [web, reports]

type

array

items

type

string

  • storageConfiguration

The configuration of the storage endpoint to which upload/download the files to/from (host and port).

Default value is [{“host”:”osp-storage”,”port”:8443}]

default

host

osp-storage

port

8443

UploadStorageConfiguration

  • templateId

The id of the template to use for this file

type

string

  • templateVariables

The variables and their values to be replaced from the template

type

object

additionalProperties

  • timeoutMs

Timeout in milliseconds before the upload is deemed as failed (default 10000 MS)

Default value is [10000]

type

integer

minimum

1

default

10000

  • variablesFiles

The variables files to use to replace the variables. The first file of the list will take precedence over the following one. Template variables take precedence over the contents of the files.

type

array

items

type

string

additionalProperties

False

UploadStorageConfiguration

type

object

properties

  • host

Host.

Default value is [“osp-storage”]

type

string

default

osp-storage

  • port

Port.

Default value is [8443]

type

integer

default

8443

additionalProperties

False