400 Error Uploading Image with fetch
Hey all, I'm having issues uploading images using a fetch request. I was able to get the relevant react native widget working but was unable to do so in my application due to an error with the line 'window.cloudinary.createUploadWidget' I gave up this path in favor of the fetch and axios post requests. When using a fetch request I encounter a 400 error that shows up in the cloudinary console but is not caught by any of my catch statements. When using axios to replace the fetch statement I get [AxiosError: Request failed with status code 400].
Below is what is being sent to the url
formData: {"_parts": [["upload_preset", "uiyvexvrgh"], ["cloud_name", "dh39belha"], ["file", "data%3Aimage%2Fjpeg%3Bbase64%2CZmlsZTovLy9kYXRhL3VzZXIvMC9ob3N0LmV4cC5leHBvbmVudC9jYWNoZS9FeHBlcmllbmNlRGF0YS8lMjU0MGRldnNvcHMlMjUyRlByb21vLVYyL1JlYWN0TmF0aXZlLXNuYXBzaG90LWltYWdlNzc0Nzg2NDYwOTczNDUwMzIwMy5wbmc="]]}
And below is the relevant code
-
Hey there Jacob,
Looking at your logs I see a few different failed upload requests. Can you please start a ticket with our support team so you can share a bit more information?
https://support.cloudinary.com/
Thanks!0
Post is closed for comments.
Comments
1 comment