我使用Cloudinary和Android应用程序.我使用以下方式上传图片:
cloudinary.uploader().upload(imagePath, ObjectUtils.emptyMap());
问题是我需要url以后检索此图像.我可以使用任何方法将上传的图片网址存储在我的应用程序中吗?
谢谢!
根据他们的文档 Documentaion 这段代码显示
Map uploadResult = cloudinary.uploader().upload(file, ObjectUtils.emptyMap());
上载同步执行.完成后,上传的图像立即可供操作和交付.
上载API调用返回一个JSON对象,其内容类似于以下示例中所示的内容:
{ "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" }
响应将自动解析并转换为Map.