-
-
Notifications
You must be signed in to change notification settings - Fork 15
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: delete file if exist before uploading another one #50
base: main
Are you sure you want to change the base?
Conversation
-I couldn't do this with one query because MySql doesn't support RETURNING clause -For retriveal tests I had to build a clean state for them to work because they were depending on Upload tests
878c5c2
to
bb09fdb
Compare
…o parent `describe`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Take a look at my feedbacks plz.
Besides that, LGTM!
- Generalize setup and tear down for all tasks image tests describe blocks - In replacing image upload test, assert that the old file is really removed and the new file is persisted
Quality Gate passedIssues Measures |
Can I merge @climba03003 @Fdawgs? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would go for temporary file approach.
- Save the file with random name.
- Remove the old file.
- Move the tmp file to proper location.
It can ensure when the transaction is rollback or file upload is failed.
You still have the copy of old file.
Do you plan to terminate this PR @Turn0xx? Or should I terminate it for you? |
@jean-michelet I plan to finish it, but i don't have much time this weeks so i don't know when. |
-I couldn't do this with one query because MySql doesn't support RETURNING clause
-For retriveal tests I had to build a clean state for them to work because they were depending on Upload tests
Issue: #38
Checklist
npm run test
andnpm run benchmark
and the Code of conduct