odoo-addon-fs-attachment-s3 16.0.2.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of odoo-addon-fs-attachment-s3 might be problematic. Click here for more details.
- odoo/addons/fs_attachment_s3/README.rst +178 -0
- odoo/addons/fs_attachment_s3/__init__.py +1 -0
- odoo/addons/fs_attachment_s3/__manifest__.py +21 -0
- odoo/addons/fs_attachment_s3/i18n/fs_attachment_s3.pot +48 -0
- odoo/addons/fs_attachment_s3/models/__init__.py +2 -0
- odoo/addons/fs_attachment_s3/models/fs_storage.py +55 -0
- odoo/addons/fs_attachment_s3/models/ir_attachment.py +82 -0
- odoo/addons/fs_attachment_s3/readme/CONFIGURE.md +64 -0
- odoo/addons/fs_attachment_s3/readme/CONTRIBUTORS.md +2 -0
- odoo/addons/fs_attachment_s3/readme/CREDITS.md +4 -0
- odoo/addons/fs_attachment_s3/readme/DESCRIPTION.md +7 -0
- odoo/addons/fs_attachment_s3/static/description/icon.png +0 -0
- odoo/addons/fs_attachment_s3/static/description/index.html +516 -0
- odoo/addons/fs_attachment_s3/tests/__init__.py +1 -0
- odoo/addons/fs_attachment_s3/tests/common.py +63 -0
- odoo/addons/fs_attachment_s3/tests/test_fs_attachment_s3.py +35 -0
- odoo/addons/fs_attachment_s3/views/fs_storage.xml +23 -0
- odoo_addon_fs_attachment_s3-16.0.2.0.0.dist-info/METADATA +195 -0
- odoo_addon_fs_attachment_s3-16.0.2.0.0.dist-info/RECORD +21 -0
- odoo_addon_fs_attachment_s3-16.0.2.0.0.dist-info/WHEEL +5 -0
- odoo_addon_fs_attachment_s3-16.0.2.0.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: odoo-addon-fs_attachment_s3
|
|
3
|
+
Version: 16.0.2.0.0
|
|
4
|
+
Summary: Store attachments into S3 complient filesystem
|
|
5
|
+
Home-page: https://github.com/OCA/storage
|
|
6
|
+
Author: ACSONE SA/NV,Odoo Community Association (OCA)
|
|
7
|
+
Author-email: support@odoo-community.org
|
|
8
|
+
License: AGPL-3
|
|
9
|
+
Classifier: Programming Language :: Python
|
|
10
|
+
Classifier: Framework :: Odoo
|
|
11
|
+
Classifier: Framework :: Odoo :: 16.0
|
|
12
|
+
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
|
|
13
|
+
Requires-Python: >=3.10
|
|
14
|
+
Requires-Dist: fsspec[s3]
|
|
15
|
+
Requires-Dist: odoo-addon-fs-attachment<16.1dev,>=16.0dev
|
|
16
|
+
Requires-Dist: odoo<16.1dev,>=16.0a
|
|
17
|
+
|
|
18
|
+
.. image:: https://odoo-community.org/readme-banner-image
|
|
19
|
+
:target: https://odoo-community.org/get-involved?utm_source=readme
|
|
20
|
+
:alt: Odoo Community Association
|
|
21
|
+
|
|
22
|
+
================
|
|
23
|
+
Fs Attachment S3
|
|
24
|
+
================
|
|
25
|
+
|
|
26
|
+
..
|
|
27
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
28
|
+
!! This file is generated by oca-gen-addon-readme !!
|
|
29
|
+
!! changes will be overwritten. !!
|
|
30
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
31
|
+
!! source digest: sha256:c7fa84a6b0932b3673afbfca4f7c1f4c6b8858362c51783043d6c5a360de5282
|
|
32
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
33
|
+
|
|
34
|
+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
|
35
|
+
:target: https://odoo-community.org/page/development-status
|
|
36
|
+
:alt: Beta
|
|
37
|
+
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
|
|
38
|
+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
|
39
|
+
:alt: License: AGPL-3
|
|
40
|
+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fstorage-lightgray.png?logo=github
|
|
41
|
+
:target: https://github.com/OCA/storage/tree/16.0/fs_attachment_s3
|
|
42
|
+
:alt: OCA/storage
|
|
43
|
+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
|
44
|
+
:target: https://translation.odoo-community.org/projects/storage-16-0/storage-16-0-fs_attachment_s3
|
|
45
|
+
:alt: Translate me on Weblate
|
|
46
|
+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
|
47
|
+
:target: https://runboat.odoo-community.org/builds?repo=OCA/storage&target_branch=16.0
|
|
48
|
+
:alt: Try me on Runboat
|
|
49
|
+
|
|
50
|
+
|badge1| |badge2| |badge3| |badge4| |badge5|
|
|
51
|
+
|
|
52
|
+
This module extends the functionality of
|
|
53
|
+
`fs_attachment <https://github.com/OCA/storage/tree/16.0/fs_attachment>`__
|
|
54
|
+
to better support Amazon S3 storage. It includes features such as:
|
|
55
|
+
|
|
56
|
+
- Special handling of X-Accel-Redirect headers for S3 storages.
|
|
57
|
+
- Options for using signed URLs in X-Accel-Redirect. (This is required
|
|
58
|
+
to be able to serve files from a private S3 bucket using
|
|
59
|
+
X-Accel-Redirect without exposing the files publicly.)
|
|
60
|
+
- Enforcing the mimetype of files stored in S3.
|
|
61
|
+
|
|
62
|
+
**Table of contents**
|
|
63
|
+
|
|
64
|
+
.. contents::
|
|
65
|
+
:local:
|
|
66
|
+
|
|
67
|
+
Configuration
|
|
68
|
+
=============
|
|
69
|
+
|
|
70
|
+
On the Odoo instance, go to *Settings* > *Technical* > *Storage* > *File
|
|
71
|
+
Storage*.
|
|
72
|
+
|
|
73
|
+
When you create a new storage for s3 or modify an existing one, when you
|
|
74
|
+
activate the option "Use X-Sendfile To Serve Internal Url", 2 additional
|
|
75
|
+
fields will appear:
|
|
76
|
+
|
|
77
|
+
- **S3 Uses Signed URL For X-Accel-Redirect**: If checked, the
|
|
78
|
+
X-Accel-Redirect path will be a signed URL, which is useful for S3
|
|
79
|
+
storages that require signed URLs for access.
|
|
80
|
+
- **S3 Signed URL Expiration**: The expiration time for the signed URL
|
|
81
|
+
in seconds. This field is only relevant if the previous option is
|
|
82
|
+
checked. By default, it is set to 30 seconds but it could be less
|
|
83
|
+
since the url generated into the X-Accel-Redirect process is directly
|
|
84
|
+
used by the web server to serve the file.
|
|
85
|
+
|
|
86
|
+
The value of these fields can also be set in the server environment
|
|
87
|
+
variables using the keys:
|
|
88
|
+
|
|
89
|
+
- *s3_uses_signed_url_for_x_sendfile*
|
|
90
|
+
- *s3_signed_url_expiration*
|
|
91
|
+
|
|
92
|
+
When the option "Use X-Sendfile To Serve Internal Url" is enabled, the
|
|
93
|
+
system will generate an X-Accel-Redirect header in the response to a
|
|
94
|
+
request to get a file. In the case of S3 storages, it will follow the
|
|
95
|
+
format:
|
|
96
|
+
|
|
97
|
+
.. code:: text
|
|
98
|
+
|
|
99
|
+
X-Accel-Redirect: /fs_x_sendfile/{scheme}/{host}/{path with query if any}
|
|
100
|
+
|
|
101
|
+
Where:
|
|
102
|
+
|
|
103
|
+
- ``{scheme}``: The URL scheme (http or https).
|
|
104
|
+
- ``{host}``: The host of the S3 storage.
|
|
105
|
+
- ``{path with query if any}``: The path to the file in the S3 storage,
|
|
106
|
+
including any query parameters. (Query parameters are set when the
|
|
107
|
+
``s3_uses_signed_url_for_x_sendfile`` option is enabled.)
|
|
108
|
+
|
|
109
|
+
In order to serve files using X-Accel-Redirect, you must ensure that
|
|
110
|
+
your web server is configured to handle these headers correctly. This
|
|
111
|
+
typically involves setting up a location block in your web server
|
|
112
|
+
configuration that matches the X-Accel-Redirect path and proxies the
|
|
113
|
+
request to the S3 storage.
|
|
114
|
+
|
|
115
|
+
For example, if you are using Nginx, you would add a location block like
|
|
116
|
+
this:
|
|
117
|
+
|
|
118
|
+
.. code:: nginx
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
location ~ ^/fs_x_sendfile/(.*?)/(.*?)/(.*) {
|
|
122
|
+
internal;
|
|
123
|
+
set $url_scheme $1;
|
|
124
|
+
set $url_host $2;
|
|
125
|
+
set $url_path $3;
|
|
126
|
+
set $url $url_scheme://$url_host/$url_path;
|
|
127
|
+
|
|
128
|
+
proxy_pass $url$is_args$args;
|
|
129
|
+
proxy_set_header Host $url_host;
|
|
130
|
+
proxy_ssl_server_name on;
|
|
131
|
+
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
Unlike the standard implementation of X-Accel-Redirect on non S3
|
|
135
|
+
storages, the S3 implementation does not require a base URL to be set in
|
|
136
|
+
the storage configuration. The X-Accel-Redirect path is constructed
|
|
137
|
+
directly from the S3 storage's URL defined for the connection, the
|
|
138
|
+
directory name as bucket name, and the file path.
|
|
139
|
+
|
|
140
|
+
Bug Tracker
|
|
141
|
+
===========
|
|
142
|
+
|
|
143
|
+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/storage/issues>`_.
|
|
144
|
+
In case of trouble, please check there if your issue has already been reported.
|
|
145
|
+
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
|
146
|
+
`feedback <https://github.com/OCA/storage/issues/new?body=module:%20fs_attachment_s3%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
|
147
|
+
|
|
148
|
+
Do not contact contributors directly about support or help with technical issues.
|
|
149
|
+
|
|
150
|
+
Credits
|
|
151
|
+
=======
|
|
152
|
+
|
|
153
|
+
Authors
|
|
154
|
+
-------
|
|
155
|
+
|
|
156
|
+
* ACSONE SA/NV
|
|
157
|
+
|
|
158
|
+
Contributors
|
|
159
|
+
------------
|
|
160
|
+
|
|
161
|
+
- Laurent Mignon laurent.mignon@acsone.eu (https://www.acsone.eu)
|
|
162
|
+
- Stéphane Bidoul stephane.bidoul@acsone.eu (https://www.acsone.eu)
|
|
163
|
+
|
|
164
|
+
Other credits
|
|
165
|
+
-------------
|
|
166
|
+
|
|
167
|
+
The development of this module has been financially supported by:
|
|
168
|
+
|
|
169
|
+
- ACSONE SA/NV (https://www.acsone.eu)
|
|
170
|
+
- Alcyon Belux
|
|
171
|
+
|
|
172
|
+
Maintainers
|
|
173
|
+
-----------
|
|
174
|
+
|
|
175
|
+
This module is maintained by the OCA.
|
|
176
|
+
|
|
177
|
+
.. image:: https://odoo-community.org/logo.png
|
|
178
|
+
:alt: Odoo Community Association
|
|
179
|
+
:target: https://odoo-community.org
|
|
180
|
+
|
|
181
|
+
OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|
182
|
+
mission is to support the collaborative development of Odoo features and
|
|
183
|
+
promote its widespread use.
|
|
184
|
+
|
|
185
|
+
.. |maintainer-lmignon| image:: https://github.com/lmignon.png?size=40px
|
|
186
|
+
:target: https://github.com/lmignon
|
|
187
|
+
:alt: lmignon
|
|
188
|
+
|
|
189
|
+
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|
|
190
|
+
|
|
191
|
+
|maintainer-lmignon|
|
|
192
|
+
|
|
193
|
+
This module is part of the `OCA/storage <https://github.com/OCA/storage/tree/16.0/fs_attachment_s3>`_ project on GitHub.
|
|
194
|
+
|
|
195
|
+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
odoo/addons/fs_attachment_s3/README.rst,sha256=kUqHWlsdPTn1GTj0tyZqlNU191mS3ECThkdmctcnCh4,6479
|
|
2
|
+
odoo/addons/fs_attachment_s3/__init__.py,sha256=X9EJGOE2GtZbS0G82PtSXmWSZ_R8jEM0rlJTDliQjp4,21
|
|
3
|
+
odoo/addons/fs_attachment_s3/__manifest__.py,sha256=FhV_fN8-BpvW7xQuR9xgXFu3b2ystU2S8864EE0Nks0,581
|
|
4
|
+
odoo/addons/fs_attachment_s3/i18n/fs_attachment_s3.pot,sha256=T_HrzRuGXQPmG4X2iEBaGnzvDcEjo_FHJDISawQaS0o,1533
|
|
5
|
+
odoo/addons/fs_attachment_s3/models/__init__.py,sha256=OfsH8Tt9nIIDh-KNTuBXialP2Iye4PVsw-A4U6VDjbY,53
|
|
6
|
+
odoo/addons/fs_attachment_s3/models/fs_storage.py,sha256=E_MDKOwKe_Po0I3aK1RiyCYmDh8A6kw1IOL9_mWq3wM,1788
|
|
7
|
+
odoo/addons/fs_attachment_s3/models/ir_attachment.py,sha256=pKTw57btmWz8eNV5lR1YUqcjyQdTs7-_Qa3rxL3ORlw,3068
|
|
8
|
+
odoo/addons/fs_attachment_s3/readme/CONFIGURE.md,sha256=pls7cefEsr7Yba8cVfWmkmFrItekwLE6V96xOzeGHkc,2561
|
|
9
|
+
odoo/addons/fs_attachment_s3/readme/CONTRIBUTORS.md,sha256=fQuQzGS-9tjXz4TtzBPthvIRrbIkYAm5fbg2-GjV564,139
|
|
10
|
+
odoo/addons/fs_attachment_s3/readme/CREDITS.md,sha256=dujpMmbuCxwnGltLAYjv5u6WQdx37lgYBZeFeDgrfnM,120
|
|
11
|
+
odoo/addons/fs_attachment_s3/readme/DESCRIPTION.md,sha256=kwIIKDmup9ylYA61ZylWdQkyYFlyyouamz3Ljy1G-cQ,480
|
|
12
|
+
odoo/addons/fs_attachment_s3/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
|
|
13
|
+
odoo/addons/fs_attachment_s3/static/description/index.html,sha256=F1GA8gCpzSJr3mHfEbc4fg4DbdIiyvouFwhazexlNa0,18327
|
|
14
|
+
odoo/addons/fs_attachment_s3/tests/__init__.py,sha256=fymN9brOYmhFYo0dk9PioEoyET4n-uxIjC4RoBVSnEY,36
|
|
15
|
+
odoo/addons/fs_attachment_s3/tests/common.py,sha256=5vEQ9L1GDpUZ4olWKTUm-jjfhRJWEX6LLTMLniEhQAg,2375
|
|
16
|
+
odoo/addons/fs_attachment_s3/tests/test_fs_attachment_s3.py,sha256=SjQplCdv383BoNLWEPBm6sl_raDXGSQOCM9Yfvso8_c,1268
|
|
17
|
+
odoo/addons/fs_attachment_s3/views/fs_storage.xml,sha256=0SZ23cdTA5MUkALYoW4nbdDlewUTFqA4V0t0kjtsjAA,971
|
|
18
|
+
odoo_addon_fs_attachment_s3-16.0.2.0.0.dist-info/METADATA,sha256=rha7x5jXhArY3mCdEzRLcfzj15t0DtJgSBNB3PcSTWI,7096
|
|
19
|
+
odoo_addon_fs_attachment_s3-16.0.2.0.0.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
20
|
+
odoo_addon_fs_attachment_s3-16.0.2.0.0.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
|
|
21
|
+
odoo_addon_fs_attachment_s3-16.0.2.0.0.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
odoo
|