django-googledrive-storage icon indicating copy to clipboard operation
django-googledrive-storage copied to clipboard

Duplicate Filename

Open NadavK opened this issue 3 years ago • 1 comments

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 avatar Aug 05 '22 00:08 NadavK

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?

NadavK avatar Dec 12 '22 12:12 NadavK