Skip to content
Snippets Groups Projects
Commit 27b86439 authored by Mathieu Walravens's avatar Mathieu Walravens
Browse files

[FIX] http: rewind file upload on serialization failure


Before this commit:
When uploading a file, if the transaction fails due to a serialization
failure, Odoo will retry the request. However, if a file upload is read
during the transaction, the file pointer will be at the end of the file,
and calling `.read()` again returns an empty bytes object.

After this commit:
Upon retrying the request, rewind uploads to the beginning of the file,
if the file supports it.

opw-3228200

closes odoo/odoo#119613

X-original-commit: a856c465
Signed-off-by: default avatarJulien Castiaux (juc) <juc@odoo.com>
Signed-off-by: default avatarWalravens Mathieu (wama) <wama@odoo.com>
parent 026f77ec
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment