deleting image with signature 400 error (The operation couldn’t be completed )
Hello Cloudinary team,
I implementing Cloudinary in my ios mobile application (swift) and when I want to delete an image using signature I get an error from the server with the code 400 and the message: " The operation couldn’t be completed "
this is my code:
let timestamp = Int(Date().timeIntervalSince1970)
let signature = cloudinarySignParamsUsingSecret(["folder":folderPath"public_id":publicId : String(describing: timestamp)], cloudinaryApiSecret: apiSecret)
let config = CLDConfiguration(cloudName: name, apiKey: apiKey)
let cloudinary = CLDCloudinary(configuration: config)
let params:CLDDestroyRequestParams = CLDDestroyRequestParams().setInvalidate(true)
params.setSignature(CLDSignature(signature: signature, timestamp: NSNumber(value: timestamp)))
cloudinary.createManagementApi().destroy(publicId, params: params).response({ (resultRes, errorRes) in
if(errorRes == nil){
print(resultRes?.result)
}
else{
print("error while deleting image from cloudinary: " + errorRes!.localizedDescription)
}
})
thank you for you help !
-
Hi,
In order to provide better feedback, can you please open a ticket at support@cloudinary.com with your cloud name?
Thank you
0
Post is closed for comments.
Comments
1 comment