Search 1.9 billion lines of Odoo code on GitHub

attachment_azure

Author: Camptocamp, Open Source Integrators, Serpent Consulting Services, Odoo Community Association (OCA)
License: AGPL-3
Branch: 16.0
Repository: agrista/odoo-cloud-platform
Dependencies: base_attachment_object_storage
Languages: Python (201, 86.3%), and reStructuredText (32, 13.7%)
Other branches: 14.0
Other repositories: ERPLibre/odoo-cloud-platform, acsone/odoo-cloud-platform, avoinsystems/odoo-cloud-platform, camptocamp/odoo-cloud-platform, gurneyalex/odoo-cloud-platform, hibou-io/camptocamp-cloud-platform, leemannd/odoo-cloud-platform, oondeo/odoo-cloud-platform, p-tombez/odoo-cloud-platform, ursais/odoo-cloud-platform-1, vrenaville/odoo-cloud-platform, and yvaucher/odoo-cloud-platform

<h1 class="title">Attachments on Microsoft Azure Blob Storage</h1> <p>This addon allows to store the attachments (documents and assets) on <a class="reference external" href="https://docs.microsoft.com/azure/storage/blobs/">Microsoft Azure Blob Storage</a>.</p> <a name="configuration"></a> <h2>Configuration</h2> <p>Activate Azure Blob storage:</p> <ul class="simple"> <li>Create or set the system parameter with the key <code>ir_attachment.location</code> and the value in the form <code>azure</code>.</li> </ul> <p>Configure accesses with environment variables:</p> <ul class="simple"> <li><code>AZURE_STORAGE_CONNECTION_STRING</code> or</li> <li><code>AZURE_STORAGE_ACCOUNT_NAME</code></li> <li><code>AZURE_STORAGE_ACCOUNT_URL</code></li> <li><code>AZURE_STORAGE_ACCOUNT_KEY</code></li> </ul> <p>One container will be created per database using the <cite>RUNNING_ENV</cite> environment variable and the name of the database. By default, <cite>RUNNING_ENV</cite> is set to <cite>dev</cite>.</p> <p>The container name can be overridden with environment variable <code>AZURE_STORAGE_NAME</code>. The strings <code>{db}</code> and <code>{env}</code> can be used inside that variable and the values will be replaced respectively by the database name and environment name.</p> <p>The container name will also be stored in the database for each attachment, and will be used to access the right container in the storage.</p> <p>This addon must be added in the server wide addons with (<code>--load</code> option):</p> <p><code>--load=web,attachment_azure</code></p> <p>The System Parameter <code>ir_attachment.storage.force.database</code> can be customized to force storage of files in the database. See the documentation of the module <code>base_attachment_object_storage</code>.</p> <a name="limitations"></a> <h2>Limitations</h2> <ul class="simple"> <li>You need to call <code>env['ir.attachment'].force_storage()</code> after having changed the <code>ir_attachment.location</code> configuration in order to migrate the existing attachments to Azure Blob Storage.</li> </ul>