You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to create a new file/image library app that does more than just provide a browser and enhanced admin form widgets for file/image selection and upload.
I'd like the library to store additional metadata like alt text, cache file size (useful when using S3 storage backend and querying file size on a list of files is slow) and type, etc.
I'd like to either contribute, an integration class to django-any-imagefield or for django-any-imagefield to have some better hooks that would allow me to use a private integration class (e.g. import the backend class from a setting).
My image/file library would use a storage name field as its primary key, and provide a descriptor on the resulting FieldFile object that is returned when you access foo.my_file_field, that would lookup the corresponding metadata from the library via foo.my_file_field.name.
I just wanted to check in with you if this sounds feasible and worthwhile, and if you could point out any likely pitfalls I might encounter?
The text was updated successfully, but these errors were encountered:
To clarify, that would be a single descriptor on my AnyFileField backend class, called metadata or library, that would lookup the corresponding object from the library, so I could do things like foo.my_file_field.metadata.size, foo.my_image_field.metadata.alt_text, etc.
Yes, adding a new library that uses foreign keys is no problem at all. We've added django-filer support too. It does mean through that new projects should choose the file browser type beforehand, much like AUTH_USER_MODEL because it affects initial migrations.
I'd like to create a new file/image library app that does more than just provide a browser and enhanced admin form widgets for file/image selection and upload.
I'd like the library to store additional metadata like alt text, cache file size (useful when using S3 storage backend and querying file size on a list of files is slow) and type, etc.
I'd like to either contribute, an integration class to
django-any-imagefield
or fordjango-any-imagefield
to have some better hooks that would allow me to use a private integration class (e.g. import the backend class from a setting).My image/file library would use a storage name field as its primary key, and provide a descriptor on the resulting
FieldFile
object that is returned when you accessfoo.my_file_field
, that would lookup the corresponding metadata from the library viafoo.my_file_field.name
.I just wanted to check in with you if this sounds feasible and worthwhile, and if you could point out any likely pitfalls I might encounter?
The text was updated successfully, but these errors were encountered: