Does anyone have a working example of uploading an image from the app to Cloudinary?
I have followed an example posted on these forums that uploads to Imgur. But I haven't been able to replicate success with Cloudinary!
Attached is my attempt!
Does anyone have a working example of uploading an image from the app to Cloudinary?
I have followed an example posted on these forums that uploads to Imgur. But I haven't been able to replicate success with Cloudinary!
Attached is my attempt!
Hi @VinDo,
I succeed in uploading a sample image after two changes in your project:
1. The file
parameter should be a Data URI as specified in the API documentation , so the dynamic property of the HTTPRequest is set with the following code:
Cloudinary.Upload_Image.file = "data:image/jpeg;base64," + ImageData.base64();
2. The file
and upload_preset
parameters are passed as Body Parameters of the POST request, not as Query Parameters.
Please see the attached modified version of your project.
This was the content of the response of my upload request:
[public_id:yie4cuj5flmquhblncra,bytes:84428,format:png,resource_type:image,placeholder:false,created_at:2018-10-18T21:06:39Z,etag:8d336031cc32ce127ddfda69e2c40035,tags:[],secure_url:https://res.cloudinary.com/di9l3wnne/image/upload/v1539896799/yie4cuj5flmquhblncra.png,type:upload,signature:bb07377b4d032b0c65af2f76e5de001f309798fd,height:244,width:200,url:http://res.cloudinary.com/di9l3wnne/image/upload/v1539896799/yie4cuj5flmquhblncra.png,access_mode:public,version:1539896799]
Andrea, this is fantastic many thanks for your help