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

API: /my_files/ does not overwrite existing file #57

Closed
moi90 opened this issue Feb 16, 2023 · 0 comments · Fixed by #58
Closed

API: /my_files/ does not overwrite existing file #57

moi90 opened this issue Feb 16, 2023 · 0 comments · Fixed by #58

Comments

@moi90
Copy link
Contributor

moi90 commented Feb 16, 2023

If I upload the a file with the same name and tag again, the server uses the old copy, if available:

UserDir.py#L48

I guess the check (if dest_path.exists()) is there to save time. But it is too late to save time at this point, anyways: The data was already transferred completely, as the multipart-encoded request body was already deserialized at this point. And it is wrong: When the file upload request finishes without error, I expect the sent data to be written.

The comment says "Should be an option", but I think this is never needed. If someone wants to skip existing files, they can GET /my_files/. (See #56.)

moi90 added a commit to moi90/ecotaxa_back that referenced this issue Feb 16, 2023
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

Successfully merging a pull request may close this issue.

1 participant