Skip to content

Commit

Permalink
files: remove HTTP code from read_content
Browse files Browse the repository at this point in the history
* Setting the return code directly hides the return code that
  ``send_file`` might be issuing, resulting in odd situations when the
    storage layer returns a 302, i.e. offload download.
  • Loading branch information
egabancho committed Feb 25, 2025
1 parent 49322b0 commit a586909
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion invenio_records_resources/resources/files/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def read_content(self):
if obj is not None and emitter is not None:
emitter(current_app, record=item._record, obj=obj, via_api=True)

return item.send_file(), 200
return item.send_file()

@request_view_args
def read_archive(self):
Expand Down

0 comments on commit a586909

Please sign in to comment.