Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File objects are unexpectedly closed after uploading to S3 #153

Open
Finndersen opened this issue May 24, 2024 · 0 comments
Open

File objects are unexpectedly closed after uploading to S3 #153

Finndersen opened this issue May 24, 2024 · 0 comments

Comments

@Finndersen
Copy link

It turns out that boto_client.upload_fileobj() causes a provided file handle/object to be closed after upload. This is an unexpected and undocumented behaviour, which just caused an error in production because the MemoryFileStore or LocalFileStore do not behave the same way.

This behaviour could be 'fixed' in S3FileStore.store_file() by using a workaround described here.

Alternatively, the MemoryFileStore and LocalFileStore should be updated to emulate this behaviour for local testing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant