RailsCasts Pro episodes are now free!

Learn more or hide this

Mark Wilson's Profile

GitHub User: markysharky70

Site: http://www.wilsonsdev.com

Comments by Mark Wilson


I had a "gotcha" with the S3Uploader class because my rails application always has a time zone set other than UTC and so my s3 request was failing with an invalid expiration time policy.

I just had to add the .utc to the end of this line in the S3Uploader intialize to get it working...

class S3Uploader
    def initialize(options)
      @options = options.reverse_merge(
        id: "fileupload",
        aws_access_key_id: ENV["AWS_ACCESS_KEY_ID"],
        aws_secret_access_key: ENV["AWS_SECRET_ACCESS_KEY"],
        bucket: ENV["AWS_S3_BUCKET"],
        acl: "public-read",
        expiration: 10.hours.from_now.utc,  #<--- added .utc
        max_file_size: 500.megabytes,
        as: "file"

I enjoyed the introduction to Meteor.

I think Opa, http://www.opalang.org is another option to look at that is equally mind-blowing and perhaps more mature than Meteor.