You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using s3 storage for all attachments - unable to preview file (pdf, jpg, gif .... ) in Documents app
workaround
if I upload an attachment (pdf) to TASK - I can preview it inside the task
but if I try to preview the PDF via Documents app, throws error like on screenshot
copy from docker container error:
2023-12-13 17:20:25,651 15 ERROR odoo odoo.http: Exception during request handling.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1988, in __call__
response = request._serve_db()
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1584, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 134, in retrying
result = func()
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1611, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1724, in dispatch
return self.request.registry['ir.http']._dispatch(endpoint)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 154, in _dispatch
result = endpoint(**request.params)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 699, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/binary.py", line 75, in content_common
stream = request.env['ir.binary']._get_stream_from(record, field, filename, filename_field, mimetype)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_binary.py", line 129, in _get_stream_from
stream = self._record_to_stream(record, field_name)
File "/mnt/extra-addons/documents/models/ir_binary.py", line 11, in _record_to_stream
return Stream.from_attachment(record.attachment_id.sudo())
File "/usr/lib/python3/dist-packages/odoo/http.py", line 475, in from_attachment
stat = os.stat(self.path)
FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/odoo/filestore/odoo/abcd123a1:/so2023_3360347-2-31088-0.pdf'
For some reason, the Documents preview is looking into some local folder (which doesnt exist)
Module
fs_attachment / fs_storage
Describe the bug
When using s3 storage for all attachments - unable to preview file (pdf, jpg, gif .... ) in Documents app
workaround
if I upload an attachment (pdf) to TASK - I can preview it inside the task
but if I try to preview the PDF via Documents app, throws error like on screenshot
copy from docker container error:
For some reason, the Documents preview is looking into some local folder (which doesnt exist)
To Reproduce
Affected versions:
odoo 16
fs_attachment+fs_storage latest
documents app
Steps to reproduce the behavior:
Expected behavior
Open/preview the file (pdf, jpg...whatever)
The text was updated successfully, but these errors were encountered: