[18.0][IMP] storage_file: improve public/private behavior#623
Conversation
eaccbba to
bae2003
Compare
bae2003 to
40b685a
Compare
SilvioC2C
left a comment
There was a problem hiding this comment.
Overall LGTM, a few things to check imho
hparfr
left a comment
There was a problem hiding this comment.
Interesting, two minor remarks
40b685a to
1f1c23a
Compare
|
@SilvioC2C @hparfr thanks for your reviews. All comments addressed! |
1f1c23a to
5b5fed0
Compare
|
Unrelated issue causing a warning |
For the case of private files stored externally it might be necessary to view the file via Odoo directly because you can avoid to setup a private CDN with complex authentication (eg: token, vpn, etc). In this way, the files can be proxied by the controller.
So far the backend was added only auto-magically on media or image creation. However, this is a partial behavior and since the backend is not editable you cannot decide where to put your file if not via global conf. This chance allows to edit the backend while still pre-loading the default one.
Provide data so that the URL is generated properly.
* group by backend * search by public/private
* group by backend * search by public/privte
5b5fed0 to
1c9ae67
Compare
|
Trying to silent the warning... |
|
@hparfr fine for you? |
|
This PR has the |
f09a28d to
1c9ae67
Compare
I don't understand why it fails here after removing the warning bypass and not on #633. Bah, I've restored the check log conf update. |
|
/ocabot merge minor |
|
What a great day to merge this nice PR. Let's do it! |
|
Congratulations, your PR was merged at 3ebaef2. Thanks a lot for contributing to OCA. ❤️ |
Improve handling of storage backend visibility and allow serving private files directly through Odoo.
Changes summary:
storage_file
/storage.file/<slug>route.backend_ideditable on forms with a pre-loaded default (configurable via ir.config_parameter).storage_image / storage_media
storage_media_product:
NOTE: as the backend is now editable, the best is to use #622 to take care of swapping backends on change.