How can i select from uploaded images in Cloudinary to add in the field of Model in django?
I'm using CloudinaryField in Django to upload the Images to the Cloudinary. It works smooth no issues. But i want to be able to select from already uploaded images from Cloudinary and add it on the model field. I searched on internet but wasn't able to find anything. Is there a way to do so? Also i want to use it in Django Admin.
-
Hi,
You could integrate the Python SDK (i.e. backend SDK) into your Django project and you can find the sample project here: https://github.com/cloudinary/cloudinary-django-sample (note that the CloudinaryField is used to define a field in the model when working with the local database as shown in the project sample).
And to retrieve the assets from your Media Library account, you can do the following implementation (see https://cloudinary.com/documentation/transformation_reference):
Image = CloudinaryImage("sample.jpg").image()
Video = CloudinaryVideo("dog").video()Hope this helps and do let us know if you have any further questions.
Best regards,
Eric
0 -
I saw the Implementation, but the thing is one need to know beforehand what media is supposed to be pulled from cloudinary. like in the implementation as `imageSource = CloudinaryImage('sample').image()` which not what i desire. i want to get a list of all the uploaded media on cloudinary, then being able to select from the media avaialble from it which i want to use. I wanted to do this with ckeditor but it seems cloudinary doesnt have prebuilt solution for it. So have to do it manually.
0 -
Hi,
While there is no ready out-of-the-box feature nor plugin integration for Cloudinary Media Library with ckeditor, I could see that ckeditor allows the use of their custom upload adapter. You may refer to the instructions that can be found here and here, and an npm package integrations could also be found here for a reference.
Hope this helps, please let me know if you have any further questions.
Best regards,
Eric
0
Post is closed for comments.
Comments
3 comments