-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cloudinary.Upload() throws a FormatException #278
Comments
In case anyone else working inside Unity comes across this same problem, I'll try to detail what I did to fix this here. The FormatException error was being thrown from the method
The issue was the userPlatform parameter. This is created from the static string When working inside Unity,
For some incredibly unhelpful reason, there is a closing parentheses missing from the end of that string, which was making HTTP reject the Header parameter. I fixed this by adding an additional closing parentheses on the end of the string returned inside
Hopefully this sort of direct meddling with the User-Agent string doesn't negatively impact me in some other way. If anyone has any cautionary advice on this, I'd love to hear your thoughts. Thanks everyone. |
@galenmolk , thank you for reporting this issue! |
Hi, hope you're doing well.
I have the Cloudinary .NET SDK integrated with a Unity project. I've placed the CloudinaryDotNet DLL, as well as all of its DLL dependencies, inside my project. I'm able to access all the Cloudinary namespaces/classes/etc. from my code, which is fantastic.
Unfortunately, when I attempt a simple implementation of
Cloudinary.Upload
, I get aFormatException
. Here's the problem code:Before the above method is called in my program, I'm setting my configuration parameters as outlined in the documentation, like this (with my actual info substituted):
Here are the package versions I'm using:
Below is the
FormatException
that I'm getting:I'm working on a Mac inside Unity 2021.1.3f1, which can use either .NET Standard 2.0 or .NET 4.x. Both APIs produce the above error.
Please let me know if there's any additional information I can provide.
Thank you so much. I would really appreciate any insight anyone might have.
All the best,
Galen
The text was updated successfully, but these errors were encountered: