Django CloudinaryField() Folder and Update
Right now I have in my user field for profile picture:
picture = CloudinaryField()
and it works great. The forms work and the Django Admin works perfectly. However, I want the picture to go to folder users/<username>/profile
Also, since it's a profile picture I would want it to NOT save the old one, and replace the old one with the new one.
the CloudinaryField doesn't seem very customizable. Any help would be VERY appreciated.
-
Hi,
Sorry for the very late reply, we have noticed that this request was left unattended. I guess this is not relevant anymore but for future reference -
You can overwrite upload_options(self, model_instance) and return a hash with a public_id of your choosing.
Please see here for more information.
0
Post is closed for comments.
Comments
1 comment