Closed yayitswei closed 9 years ago
Are you sure the name of your bucket is my-bucket
?
POST https://**my-bucket**.s3-eu-west-1.amazonaws.com/ net::ERR_CONNECTION_RESET
It's not, I changed the name of the bucket for privacy (since at the moment it has a very permissive policy).
Your CORS configuration looks alright.
Is your bucket located in s3-eu-west-1
? In 0.1.0
this was not customisable. If your bucket is in another zone I recommend you update to 0.2.0
which introduces an additional aws-zone
parameter. See the changelog in the Readme for details.
Thanks for your update, I got it working!
For the bucket location, I had to use the generic s3
instead of s3-eu-west-1
. Do you know why my bucket didn't have a zone attached to it?
Also, I had to add in
(extend-type js/HTMLCollection
ISeqable
(-seq [array] (array-seq array 0)))
to work around the "HTMLCollection is not seqable"
error in the line (first (.getElementsByTagName (.getResponseXml (.-target res)) "Location"))
.
Do you know why my bucket didn't have a zone attached to it?
No. As far as I understand buckets must be associated with a region.
(extend-type js/HTMLCollection
ISeqable
(-seq [array] (array-seq array 0)))
Good catch. I probably had this in the project I was using it so I didn't notice that it'd break without that extend-type statement.
It's probably a good idea to use (aget (.getElements... ) 0)
here instead of first
.
PR welcome! :smile:
You can now use [org.martinklepsch/s3-beam "0.2.1"]
which uses aget
instead of first
.
https://github.com/martinklepsch/s3-beam/commit/fa3238968f9e059968bf0731ed488fa50e437502
Thanks! You beat me to the pull request :)
Hi Martin, thanks for making s3-beam.
I'm getting some errors when uploading to S3. Some files yield this error:
And some this error:
Here's the S3 configuration I'm using:
Am I missing something?