Auto-uploading with special characters
When attempting to use an auto-upload rule that maps:
https://images.unsplash.com/ to https://res.cloudinary.com/tgtbatphone/image/upload/unsplash/
it appears that escaped special characters are not working.
Original image (1000x1000): https://images.unsplash.com/photo-1518821703881-9da5a9f42038?fm=jpg&crop=entropy&fit=crop&h=1000&w=1000
Auto-upload, non-escaped (6240 x 4160): https://res.cloudinary.com/tgtbatphone/image/upload/unsplash/photo-1518821703881-9da5a9f42038?fm=jpg&crop=entropy&fit=crop&h=1000&w=1000
Auto-upload, escaped (400 error): https://res.cloudinary.com/tgtbatphone/image/upload/unsplash/photo-1518821703881-9da5a9f42038%3Ffm=jpg%26crop=entropy%26fit=crop%26h=1000%26w=1000
Any tips on getting query string arguments through for auto-uploads?
-
Hello,
Please note that special characters should be double-escaped. In your case, the following should work- https://res.cloudinary.com/tgtbatphone/image/upload/unsplash/photo-1518821703881-9da5a9f42038?fm=jpg%2526crop=entropy%2526fit=crop%2526h=1000%2526w=1000
Hope this helps, please let us know if you have any other questions.
Thanks
-
Thanks for the response. In your URL, we're still getting a 6240x4160 image, which suggests that the variables aren't making it to the other server. I tried double-escaping the '?' as well to get:
But that's resulting in a 400 as well.
Any other ideas / tips?
-
Hello,
I changed the configuration on your account to enable single encoding of URLs
The following should now work-
That being said, I see that you are using a preset that uses Imagga Crop and Scale and you are not subscribed to that addon. Please make sure to subscribe to the addon so the above will work- https://cloudinary.com/console/addons
Thanks,
Raya
-
Hi Raya. Thanks for the response.
Unfortunately, the two links don't appear to be accessing the same resource.
The URL you provided: http://res.cloudinary.com/tgtbatphone/image/upload/unsplash/photo-1518821703881-9da5a9f42038%3Ffm=jpg%26crop=entropy%26fit=crop%26h=1000%26w=1000 is consistently returning a HTTP with an error status code of 420.
This should be accessing the image from: http://images.unsplash.com/photo-1518821703881-9da5a9f42038?fm=jpg&crop=entropy&fit=crop&h=1000&w=1000, which returns an asset w/ HTTP 200.
Any ideas on how we can access the resource at the former URL w/ the auto-upload method?
Post is closed for comments.
Comments
5 comments