[Answer]-Django cloudinary upload remote image via url – invalid file name

1👍

✅

The issue here is that the image parameter as received from the request is actually of type unicode and not str. The current version of Cloudinary’s python library does not handle this correctly.
The next version of the the library will include a fix for this issue. In the meanwhile, you can do the following:

cimage = cloudinary.uploader.upload(image.encode('utf-8'), public_id = 'img_'+request.user.__str__()+"_"+title, format='jpg')

Thank you for reporting this.

Leave a comment