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

Recognize when identical splits are being uploaded #13

Closed
glacials opened this issue Dec 2, 2013 · 2 comments
Closed

Recognize when identical splits are being uploaded #13

glacials opened this issue Dec 2, 2013 · 2 comments
Labels
feature Issues that are solved by adding new functionality for users

Comments

@glacials
Copy link
Owner

glacials commented Dec 2, 2013

If a file being uploaded is identical to one that's already been uploaded, we should drop the new file and direct the user to the existing splits.

To do this we could hash each file when it's uploaded and store the hash in the database. Then whenever new splits are uploaded, we check the database for their hash.

@glacials
Copy link
Owner Author

Now that accounts are a thing, this becomes a little different. If a signed in user is uploading splits which are identical to some previously-uploaded splits that they don't own, we should allow the upload to happen and the existence of both copies. We should only direct to existing splits if the same user uploaded both, or if both are anonymously uploaded.

A slight problem that may happen is a user wishes to have two copies of splits, one anonymous and one tied to an account, and so that user uploads the same splits twice in a row with the intention of disowning one copy. In this situation we'd (incorrectly) never make the second copy. I don't think this is big enough of a deal to worry about for now though.

@glacials
Copy link
Owner Author

This will be much much easier to handle as a part of #66. We can hash the file and store the hash in the runs table as the key lookup, and that will close this issue for free.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Issues that are solved by adding new functionality for users
Projects
None yet
Development

No branches or pull requests

1 participant