仅存储 Cloudinary eager 转换,而不存储原始大小

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

我正在开发一个网站,人们可以上传图像,当然他们也可能会上传大量文件,这会耗尽网络应用程序上下文中不需要的云存储空间。因此,我有一个急切的转换集,但它存储原始大小和转换。有没有办法告诉 Cloudinary 只存储转换后的图像?

这是我的代码:

    return cloudinary.v2.uploader.upload(data, {
      use_filename: true,
      unique_filename: false,
      folder: body.userId,
      eager: { width: 100, height: 100 }
    });
  });
node.js cloudinary
1个回答
0
投票

为了使其正常工作,请使用

transform
属性而不是
eager

return cloudinary.v2.uploader.upload(data, {
      use_filename: true,
      unique_filename: false,
      folder: body.userId,
      transformation: { width: 100, height: 100 }
    });
© www.soinside.com 2019 - 2024. All rights reserved.