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

fix: Check before writing if writing without a part file #310

Merged
merged 3 commits into from
Mar 28, 2023

Conversation

juliusknorr
Copy link
Member

@juliusknorr juliusknorr commented Feb 23, 2023

When uploading to object storage and not using a part file the logic from #170 is behaving badly these days as the unlink will put the file into the trash bin. We can actually check before writing the file to stream as mime types are never detected by content on object storage.

Steps to reproduce:

  • Setup primary object storage
  • Upload a large file (through chunked upload) that has its mime type blocked

Before:
See that there is a copy of the file still stored in the trash bin

After:
See that the file is not moved on chunk assembly at all

@juliusknorr
Copy link
Member Author

🏓 @nickvergessen Covered by the integration tests now and ready for review

Signed-off-by: Julius Härtl <jus@bitgrid.net>
@juliusknorr juliusknorr force-pushed the bugfix/noid/s3-upload-block branch from 7ebb78e to d834286 Compare March 28, 2023 04:40
Signed-off-by: Julius Härtl <jus@bitgrid.net>
@juliusknorr juliusknorr force-pushed the bugfix/noid/s3-upload-block branch from d834286 to 1c26fea Compare March 28, 2023 07:54
@nickvergessen nickvergessen enabled auto-merge March 28, 2023 08:08
@nickvergessen nickvergessen merged commit 34cef76 into master Mar 28, 2023
@delete-merged-branch delete-merged-branch bot deleted the bugfix/noid/s3-upload-block branch March 28, 2023 08:30
@juliusknorr
Copy link
Member Author

Preparing backports of integration tests so we can also have the stable branches covered.

@nickvergessen
Copy link
Member

/backport to stable26

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

Successfully merging this pull request may close these issues.

2 participants