没有从云中获取上下文和图像

问题描述 投票:0回答:1

为什么我没有获得上下文和图像响应,即使我将图像和上下文从nodejs存储到cloudinary

const 结果=等待cloudinary.api.resources();

// console.log('Cloudinary API result:', result);

// Extract relevant information from the result for images
const images = result.resources
  .filter(resource => resource.type === 'upload')
  .map(resource => {
    // Log the resource object
    console.log('Resource***********************************************:', resource);

    // Return the desired structure for the mapped object
    return {
      publicId: resource.public_id,
      imageUrl: resource.url,
      imagetitle: resource.context
    };
  });in the resource resource object i not getting the context even though i stored image along with the context
node.js cloudinary
1个回答
0
投票

有一个有用的方法可以通过上下文获取资源。您可以在这里找到一个示例: https://cloudinary.com/documentation/admin_api#get_resources_by_context

© www.soinside.com 2019 - 2024. All rights reserved.