Lajos Neto
Lajos Neto

Reputation: 157

Retrieve Android/Cloudinary uploaded image URL

Im using Cloudinary along with an Android App. Im uploading a image using:

cloudinary.uploader().upload(imagePath, ObjectUtils.emptyMap());

The problem is that I need the url to retrieve this image later. Is there any method that I can use to store the uploaded image url inside my App?

Thanks!

Upvotes: 2

Views: 2002

Answers (1)

Ahsan
Ahsan

Reputation: 121

According to their documentation Documentaion This code shows

Map uploadResult = cloudinary.uploader().upload(file, ObjectUtils.emptyMap());

Uploading is performed synchronously. Once finished, the uploaded image is immediately available for manipulation and delivery.

An upload API call returns a JSON object with content similar to that shown in the following example:

{
 "public_id":"tquyfignx5bxcbsupr6a",
 "version":1375302801,
 "signature":"52ecf23eeb987b3b5a72fa4ade51b1c7a1426a97",
 "width":1920,
 "height":1200,
 "format":"jpg",
 "resource_type":"image",
 "created_at":"2013-07-31T20:33:21Z",
 "bytes":737633,
 "type":"upload",
 "url":
   "http://res.cloudinary.com/demo/image/upload/v1375302801/tquyfignx5bxcbsupr6a.jpg",
 "secure_url":
   "https://res.cloudinary.com/demo/image/upload/v1375302801/tquyfignx5bxcbsupr6a.jpg",
 "etag":"1adf8d2ad3954f6270d69860cb126b24"
}

The response is automatically parsed and converted into a Map.

Upvotes: 7

Related Questions