Skip to content

[19.0][fs_storage] Error 500 on direct attachment streaming #631

Description

@arielbarreiros96

Method _to_http_stream not overridden for attachments, it causes causes FileNotFoundError (HTTP 500) on direct attachment streaming

Module

fs_attachment

Bug

When the method _to_http_stream is called, for example when loading the /doc endpoint, there is a 500 error, and on the logs can be seen Traceback: ir_attachment.py:921 os.stat(stream.path) → FileNotFoundError: /var/lib/odoo/filestore/mydatabase/s3://my_s3_bucket.

This happens for example when S3 locations is being used, non detectable with regular filestore

To Reproduce

19.0
1- Completely configure S3 filestore
2- Try to access /doc endpoint

Notice that this is how I found out, any other call to _to_http_stream should cause the same problem

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions