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

Duplicate Filename #57

Open
NadavK opened this issue Aug 5, 2022 · 1 comment
Open

Duplicate Filename #57

NadavK opened this issue Aug 5, 2022 · 1 comment

Comments

@NadavK
Copy link

NadavK commented Aug 5, 2022

When uploading the same filename to two separate folders, the URL of both files are the same (meaning one is incorrect).
Per my understanding of the code logic, this is due to using the filename as the unique index.
I started changing the code to use the GDrive FileID, but this required large changes to correctly display the filename in the admin view.
Instead, maybe the entire path+filename can be used as the unique ID? And then to subclass the ClearableFileInput widget to remove the path for display?
WDYT?

@NadavK
Copy link
Author

NadavK commented Dec 12, 2022

I fixed this in a separate branch: https://github.com/NadavK/django-googledrive-storage.
It's a breaking change, so am not requesting to merge back.
Would appreciate if @torre76 can comment if maybe there is a better way to deal with duplicates?

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