Breadcrumbs

File Engine Environment Variables

Following are the environment variables used in the File-Engine service.

Config Parameter

Expected Value

Notes

MINIOPORT

9000

Port where minio server is listening, default is 9000

ACCESSKEY

admin

Access key of Minio Server

SECRETKEY

admiN123!

Secret Key of Minio Server

ENDPOINT

minio

Address of minio service

USESSL

true/false

Host api via https/http. Set true to host via https. Default is true

USESSL_MINIO

true/false

Connect to Minio Server via SSL. Default is true

CERTIFICATE_AUTHORITY

https/

file-engine.ca

-bundle

Certificate authority bundle path

BUCKETNAME

default

The name of Minio bucket to create on first connection. This bucket is created by File Engine

PRIVATEKEY

https/localhost.key

Private key file to host File Engine via SSL. Used when USESSL is true

CERTIFICATE

https/localhost.cert

Private certificate file to host File Engine via SSL. Used when USESSL is true

PASSPHRASE

expertflow

Passphrase of certificate

MAXFILESIZE

5

Allowed max file size in Megabytes. Default is 5MB.

ALLOWEDFILETYPES

png,jpeg,jpg,pdf,ppt,doc,docx,xls,xlsx,txt

Allowed files types. Add desired extensions via separating values by comma.

CONTENTDISPOSITION

inline

In a regular HTTP response, the Content-Disposition response header is a header indicating if the content is expected to be displayed inline in the browser, that is, as a Web page or as part of a Web page, or as an attachment, that is downloaded and saved locally. For further information, check

MDN

.

USE_FORWARD_PROXY

false


USE_SECURED_FORWARD_PROXY

false


FORWARD_PROXY_HOST

0.0.0.0


FORWARD_PROXY_PORT

8080


FORWARD_PROXY_USER

xxxx


FORWARD_PROXY_PASSWORD

xxxx


FILE_NAME


FILE_NAME environment variable can be used to configure custom filename schemes. If FILE_NAME environment variable is not present or empty, default scheme will be used.
Default Scheme:
File is stored in Minio S3 bucket using this naming scheme: <conversation-id>_<original-file-name>.<extension>
Where:

  • <conversation-id>     : conversation id for which file is being uploaded

  • <original-file-name> : original file name while uploading

  • <extension>               : extension of file

FILE_NAME can be configured using the following four variables:

  1. {CONVERSATION_ID}   : conversation id for which file is being uploaded

  2. {UUID}                            : use it if you want to use GUID/UUID in filename

  3. {ORIGINAL_NAME}        : original file name while uploading

  4. {EXT}                              : extension of file

Examples:

  • FILE_NAME={CONVERSATION_ID}_{UUID}_{ORIGINAL_NAME}.{EXT} will produce a file name of <conversation-id>_<a-random-uuid>_<actual-file-name>.<extension>

  • FILE_NAME={UUID} will produce a file name of <a-random-uuid>. It will not have any extension but note that its mime type will remain original.

The above mentioned examples are showing just two possibilities, you can add them in any format. Spaces in file name will be replaced to -, for example: FILE_NAME={UUID}    {ORIGINAL_NAME}  .{EXT} will yield <a-random-uuid>---<original-file-name>---.<extension>