Skip to content

File Storage

By default all uploaded files (attachments) are stored in data/upload directory. EspoCRM is shipped with AWS S3 support. Developers can add other providers by implementing Espo\Core\FileStorage\Storage interface.


Parameters need to be set in data/config-internal.php:

  'defaultFileStorage' => 'AwsS3',
  'awsS3Storage' => [
    'bucketName' => 'BUCKET_NAME',
    'credentials' => [
      'key' => 'KEY',
      'secret' => 'SECRET',
    'region' => 'YOUR_REGION',

Credentials can be omitted, then they will be read from the environment.

Moving existing attachments

After setting up a file storage, all existing attachments will be still stored locally in data/upload directory. You can move them manually to the storage and then execute the following SQL query:

UPDATE `attachment` SET `storage` = '{StorageName}'

where '{StorageName}' is a name of the storage, e.g. AwsS3.