我无法使用ios sdk从cloudinary中删除图像,它一直要求我提供签名:

Optional(Error Domain=com.cloudinary.error Code=400 "(null)" UserInfo={message=Missing required parameter - signature})

要从cloudinary中删除图像,我正在使用:
let config = CLDConfiguration(cloudName: self.cloudname, apiKey: self.apiKey)
let cloudinary = CLDCloudinary(configuration: config)
print(self.separateIdFromUrl(url: (photo?.url)!))
_ = cloudinary.createManagementApi().destroy(self.separateIdFromUrl(url: (photo?.url)!))

最佳答案

我找到了解决办法
把你的照片给我
也检查this

func deletePhoto(url: String) {

    let photoName = "folderName/" + String(describing: url.split(separator: "/").last!.split(separator: ".").first!)

    let config = CLDConfiguration(cloudName: "CloudName", apiKey: "API-KEY", apiSecret: "API-SECRET", secure: true)
    cloudinary = CLDCloudinary(configuration: config)

    cloudinary.createManagementApi().destroy(photoName) { (response, err) in

        print(response?.result)
    }
}

关于swift - 如何销毁图像Cloudinary Swift 3版本,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/48292343/

10-11 07:42