Providing browse from uploads button for ImageField

12 views
Skip to first unread message

Burak Emre Kabakcı

unread,
Oct 13, 2013, 11:07:58 PM10/13/13
to django...@googlegroups.com
Is it possible to change field type when saving a model to database? I have an ImageField and I want to put a button for choosing an image already uploaded. I know that ImageField acts like CharField when saving data to database but it uses multipart/form-data so it doesn't see POST data when converting the user data to a model. When I change the input type to text and append some strings to it ImageField doesn't change. I can do it with ModelAdmin.save_model by manipulating ImageField manually with POST data but I wonder if it's possible to do something like that in Field level.
Reply all
Reply to author
Forward
0 new messages