[FEATURE-REQUEST] Custom type field: image, audio, etc...
areski opened this issue ยท 4 comments
We might want to consider keeping in mind when drafting kaffy for extendability.
For instance in Django-admin I have built this addons years ago to upload audio files https://github.com/areski/django-audiofield
Similar django-admin addons exists to upload images, videos etc...
This type of addons, give some flexibility in building a custom display for the file you are uploading, add some custom javascript.
I couldn't agree more. Already testing something locally for this. Will have a new branch for it this week hopefully.
Thanks, take all the time you need!
For future reference, I have an example of custom image field on a test project:
- https://github.com/areski/ex-chitchat/blob/master/lib/chit_chat_web/helpers/custom_image_field.ex
- https://github.com/areski/ex-chitchat/blob/master/lib/chit_chat_web/admin/upload_admin.ex
The upload of images created thumbnail and fill up few fields for size/content_type.
With our new ability to overload field, save, update etc... the integration with Kaffy is perfect.
Update of image also display the current image:
YES! ๐ ๐ ๐ ๐ ๐
Haha that is awesome! ๐๐ป๐ช๐ผ