简体   繁体   English

通过cloudinary小部件UI上传图像时获取元数据

[英]get metadata while uploading image by cloudinary widget UI

Is it possible to get metadata of the image being uploaded by cloudinary widget UI ? 是否可以获取cloudinary小部件UI上传的图像的元数据?

Present solution - 当前解决方案-

1.uploading image by cloudinary widget UI. 1.通过cloudinary小部件UI上传图片。

2.sending request to cloud fucntion. 2.将请求发送到云功能。

3.cloud function sending request to cloudinary to get meta data of the image by public id of the image. 3.cloud功能发送请求到cloudinary通过图像的公共ID获取图像的元数据。

4.recieving meta data at cloud function of the image by cloudinary. 4.通过cloudinary在图像的云功能处接收元数据。

5.sending minimal required meta data - (A) date (B) location to client side. 5.发送最少的必需元数据 - (A)将日期(B)定位到客户端。

The whole process takes around 1-1.5 seconds.

Most of the time consumed is the communication between cloud function & cloudinary to send request with public id to fecth metadata of the image and send back response to the cloud function. 消耗的大部分时间是云功能与cloudinary之间的通信,用于发送具有公共ID的请求以感染图像的元数据,并将响应发送回云功能。 It take around around 0.5-1s depending on the size of the meta data. 根据元数据的大小,大约需要0.5-1s。

Is there any better solution where i can get the metadata/exif (date & location of the image), on client side itself. 有没有更好的解决方案,我可以在客户端本身上获取元数据/ exif(图像的日期和位置)。

Does cloudinary while uploading through widget UI have any option of returning required metadata to the client. 通过窗口小部件UI上传时,cloudinary是否有将所需元数据返回给客户端的任何选项。

Note - i don't have acess to input tag for image upload, as its imbeded inside cloudinary widget UI. 注意-我不需要输入标签来上传图像,因为它嵌入在cloudinary小部件UI中。

Make sure to set the Image metadata parameter on the upload preset you are using to Yes : 确保将您使用的上传预设上的Image metadata参数设置为Yes

在此处输入图片说明

And if the image included location, it should be in upload response. 并且如果图片包含位置,则应该在上传响应中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM