Add attachment_s3

This commit is contained in:
Guewen Baconnier
2016-10-24 17:12:27 +02:00
parent 2f00f776e8
commit 7825661a1a
5 changed files with 299 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
Attachments on S3 storage
=========================
This addon allows to store the attachments (documents and assets) on S3 or any
other S3-compatible Object Storage.
Configuration
-------------
With system parameters:
* Create or set the system parameter with the key ``ir_attachment.location``
and the value in the form ``s3://<access-key>:<secret-key>@<bucket-name>``
* If the host is not AWS services, you can set the key
``ir_attachment.location.s3host`` to the hostname of the Object Storage
service
With environment variables:
* Create or set the system parameter with the key ``ir_attachment.location``
to ``s3://`` and configure the following environment variables:
* ``AWS_HOST`` (not required if using AWS services)
* ``AWS_ACCESS_KEY_ID``
* ``AWS_SECRET_ACCESS_KEY``
* ``AWS_BUCKETNAME``
Limitations
-----------
When the addon is installed, files have already been created in the filesystem
or in the database. The addon won't automatically move them over the Object
storage. You can move them by calling the method ``force_storage`` on
``ir.attachment`` though (it might take time if you have many attachments).