Upload Video in IOS
unsignedUpload :
let config = CLDConfiguration(cloudinaryUrl: claudinaryURL)
let claudinary = CLDCloudinary(configuration: config!)
let params = CLDUploadRequestParams(params: ["resource_type" : "raw" as AnyObject])
claudinary.createUploader().upload(data: videoData!, uploadPreset: present, params: params) { (result, error) in
print(result)
}
signedUpload:
let signature = "api_key=\(apiKey)&" + "timestamp=" + timestamp + api_secret
params.setParam("api_key", value: "apiKey")
params.setParam("timestamp", value: timestamp)
params.setParam("resource_type", value: "video")
params.setParam("vc", value: "auto")
params.setSignature(CLDSignature(signature: sha, timestamp: timestampNumber))
Can't upload video, with signedUpload always get "Invalid Signature", with unsignedUpload "Invalid image file" even if set resource type to video. Is there any fixes ?
I'm using swift 3, iOS 10.
-
Hi Dor, first, please make sure you use our latest iOS library version.
Signed upload - you've set a 'vc' parameter which actually should be 'video_codec'. Please change the relevant line to -
params.setParam("video_codec", value: "auto")
Unsigned upload - can you please try again and share with us the exact full error message you're getting and the timeframe in which you performed this action, so we can check it in our logs? (if you rather keep this private, please feel free to open a support ticket and we'll continue from there).
0
Post is closed for comments.
Comments
1 comment