如何删除 Cloudinary 上的 zip 文件?
How to delete a zip file on Cloudinary?
我的代码通过调用创建一个 zip 文件,
Cloudinary.Multi()
现在我要在 cloudinary 上删除 images.zip。
Cloudinary.DeleteResourcesByTag() //don't work because images.zip has no tag to it.
Cloudinary.DeleteAllResources() // Deletes all images. Zip files persist
Cloudinary.DeleteResources() //May work, what parameters should I pass to it?
我将 Cloudinary .Net 与 PowerShell 结合使用。 C# 或任何语法的答案将是 o.k
如何删除压缩包?
根据 Cloudinary 支持的回复,
In order to delete a ZIP file generated by the multi API, you should
set its public ID, e.g., outbox,zip (mind the comma), and also set the
type to multi at the deletion API call.
我能够开发一个可行的解决方案,
Cloudinary cloudinary = new Cloudinary(account);
List<string> IDlist = new List<string>();
list.Add("outbox,zip");
DelResParams delParams = new DelResParams();
delParams.PublicIds = IDlist;
delParams.Type = "multi";
cloudinary.DeleteResources(delParams);
PowerShell 版本是,
$list = New-Object -TypeName System.Collections.Generic.List[string]
$list.Add("outbox,zip")
$deleteParams = New-Object CloudinaryDotNet.Actions.DelResParams
$deleteParams.PublicIDs = $list
$deleteParams.Type = "multi"
$cloudinary.DeleteResources($deleteParams)
我的代码通过调用创建一个 zip 文件,
Cloudinary.Multi()
现在我要在 cloudinary 上删除 images.zip。
Cloudinary.DeleteResourcesByTag() //don't work because images.zip has no tag to it.
Cloudinary.DeleteAllResources() // Deletes all images. Zip files persist
Cloudinary.DeleteResources() //May work, what parameters should I pass to it?
我将 Cloudinary .Net 与 PowerShell 结合使用。 C# 或任何语法的答案将是 o.k
如何删除压缩包?
根据 Cloudinary 支持的回复,
In order to delete a ZIP file generated by the multi API, you should set its public ID, e.g., outbox,zip (mind the comma), and also set the type to multi at the deletion API call.
我能够开发一个可行的解决方案,
Cloudinary cloudinary = new Cloudinary(account);
List<string> IDlist = new List<string>();
list.Add("outbox,zip");
DelResParams delParams = new DelResParams();
delParams.PublicIds = IDlist;
delParams.Type = "multi";
cloudinary.DeleteResources(delParams);
PowerShell 版本是,
$list = New-Object -TypeName System.Collections.Generic.List[string]
$list.Add("outbox,zip")
$deleteParams = New-Object CloudinaryDotNet.Actions.DelResParams
$deleteParams.PublicIDs = $list
$deleteParams.Type = "multi"
$cloudinary.DeleteResources($deleteParams)