ben.8 wrote:
Q1. Is it possible to change the URL returned by this function? Right
now it returns "http://s3.amazonaws.com/[bucket]/[key]?(key/expire/
sig)". I have a CNAME set for my s3 to [bucket].s3.amazonaws.com, so
would want the function to return "http://myCNAME/[key]?(key/expire/
sig)".
There is no difference. Both URL's will work. If you are trying to
disguise the fact you are using S3 then that won't matter as the signed
URL clearly has the Amazon Key on its URL string.
For example, the images for Twitter come straight from Amazon S3; they
do not try to disguise it.
[@Peter, the domain part you are reading in the API is for connecting to
other S3 endpoints or Walrus/Google endpoints. The same function can be
used to pull data from other providers supporting/cloning the Amazon S3 API]
Q2: The "Expires" field is a ten digit number; how is this generated?
That is the time field, representing a real date (UTC) that the URI will
expire. You can pass in a real date to that one. Make sure if you are
time-zoned for example the date is relatively to GMT/UTC.
P1: I am getting a lot of intermittent "SignatureDoesNotMatch" errors.
Sometimes the URL resolves correctly, the next refresh it does not.
Has anyone else seen this behaviour?
We are using some aw2.0 libraries here that we have donated to the
OpenBD project, that was recently fixed in this area. Once our Gema has
come back from holiday, she will update the OpenBD branch.
--
official tag/function reference: http://openbd.org/manual/
mailing list - http://groups.google.com/group/openbd?hl=en