Friday, December 14, 2007

URL Sanitization and Picnik

This is a much shorter post than the others have been, but I don't think that's going to be too terrible. ;-P

Anyways, I'm also working on integration with our product with Picnik, and just recently resolved an issue with them. Our images are (or will be) hosted with Amazon's S3 service (which is wicked sweet, if you know how to use it,) and we use secure URLs to access them, along with all the parameters that amazon requires to call a photo (securely.) They fixed the secure URL issue, but for some reason, the photos still would not load in. It turned out that the parameters in the Amazon URL were the problem. They needed to be sanitized (i.e. all "="s became %3D, etc. I found the conversions on this website.) before they'd work. After doing that, they worked fine. One important thing to note, though, is that if I write anything to generate URLs for S3-based images, there should be another one for creating the "editing" url, complete with the picnik url and sanitized S3 URL. Good thing to remember, and it was a reminder that little things like that really have to be watched for, since they happen to me far more often then I'd like to say.

No comments: