Uploading M4A with iOS SDK
Howdy! I've recently added the Cloudinary SDK for iOS to our project, and am working on uploading a locally-recorded audio file to Cloudinary.
After some fussing, I got the signature verifying for the signed upload, and it looks like everything's in place to send the M4A audio file, but the API returns this error:
{ "error": { "message": "Image file format m4a not allowed" } }
Oddly, this continues even though I've called setResourceType(.auto)
on my CLDUploadRequestParams
and I've verified in proxyman that the upload URL is using auto
, the same as the (functional) web version of this feature. (I've tried explicitly using .video
as well with the same result.)
Is the "Image file format" portion of the error a red herring? Or am I still doing something wrong with my upload logic?
Answers
-
Hi @SeanMcDox ,
Thanks for reaching out.
Could you please send us the file you are testing and is it happening on other M4A audio files?
I'm looking forward to your response.
Kind Regards,
Thomas
0 -
Hey, Tom! Thanks for your response; I'd be glad to send along the file. (I can include a HAR for the whole request too if that's helpful.) What's the best way to get that to you? (Apologies if this is common knowledge; I'm pretty new to Cloudinary.)
0 -
Hi @SeanMcDox ,
You can upload it here or if you prefer open a ticket via support.cloudinary.com and send it there referencing this post.
Thanks,
Thomas
0 -
Hi,
Just closing the loop here, the issue was that you were using an upload preset and only allowing specific extensions. m4a was not part of this allow list which is the reason for the error.
Thanks,
Thomas
0 -
It seems like you're encountering an issue with uploading M4A audio files through the Cloudinary SDK for iOS. The error message
indicates that the "Image file format m4a not allowed." This could be due to how Cloudinary categorizes file formats.
Despite setting the resource type to auto and trying .video explicitly, the issue persists. While the error message mentions "Image file format," it might be a general error response for file format-related issues.
To troubleshoot, ensure that Cloudinary supports M4A uploads and that your upload logic aligns with the platform's specifications for audio uploads. Double-check the SDK documentation or reach out to Cloudinary support for specific guidance on handling M4A files.
It's possible that the term "Image" in the error message might be a generic label and not indicative of the actual problem. Focusing on resolving the file format issue in the context of audio uploads might be the key to addressing this challenge.
0