【发布时间】:2021-10-22 09:52:18
【问题描述】:
我将一个视频上传到 cloudinary,该视频通过“谷歌视频审核”进行了审核。如果视频审核状态获得批准,我想保存视频的 public_Id 和 url。我已经能够成功地为视频查询 cloudinary,但我不知道如何遍历查询结果。我需要使用 NodeJS 从结果中迭代并仅获取 public_Id 和 url。 我还没有尝试过任何东西,因为我是 NodeJS 的新手。
查询结果:
{
resources: [
{
asset_id: '54598f6f952b934d45b9b8dfa3b9298f',
public_id: 'm7zp9okftllenzmigyng',
format: 'mp4',
version: 1629500308,
resource_type: 'video',
type: 'upload',
created_at: '2021-08-20T22:58:28Z',
bytes: 1004360,
width: 640,
height: 352,
url: 'http://res.cloudinary.com/dt3ic2vk7/video/upload/v1629500308/m7zp9okftllenzmigyng.mp4',
secure_url: 'https://res.cloudinary.com/dt3ic2vk7/video/upload/v1629500308/m7zp9okftllenzmigyng.mp4'
}
],
rate_limit_allowed: 500,
rate_limit_reset_at: 2021-08-21T00:00:00.000Z,
rate_limit_remaining: 490
}
【问题讨论】:
标签: javascript node.js cloudinary