I also agree with you that custom storage will be more elegant solution.

On the other hand it seems to me that reusing the same file on upload will 
not allow a clean management of user's resources, for instance if a user 
decide to delete a file we won't be able to tell if this file is used by an 
other user too.



On Tuesday, August 5, 2014 3:59:31 AM UTC+2, Collin Anderson wrote:
>
> It seems to me a setting is not the way to go, but a custom storage would 
> be better. I've made a custom storage the computes the md5 of the content 
> and uses that as the directory of the file, though that generate a whole 
> lot of directories. In a lot of ways, I think it would be great if django 
> could try to check to see if the duplicate files also have the same content 
> and re-use the first file if so. Otherwise I'm still in the mindset that 
> filename_1, filename_2 is an improvement over filename_, filename__, 
> filename___. :).
>
> It would be nice if upload_to functions had access to the file content.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/a3aefba8-6662-482c-a177-efe3fdf3452f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to