Permalink
Browse files

Made the expiration date for the policy a utc date.

(As advised by kookster:

"
I also posted this on the elcgit parent of this fork, but you seem to be making updates more often, so thought you might incorporate it sooner.

If you have used newish RoR ability to set a time zone, then you need to make sure the expiration_date included in the policy block for s3 is utc.

Line 30:

    expiration_date = 1.hours.from_now.strftime('%Y-%m-%dT%H:%M:%S.000Z')

Should be:

    expiration_date = 1.hours.from_now.utc.strftime('%Y-%m-%dT%H:%M:%S.000Z')
"
)
  • Loading branch information...
1 parent 8702875 commit d9be753b565041bde12b5fe0f277fe8eb3e930c2 Martin committed Aug 29, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 generators/s3_swf_upload/templates/controller.rb
View
2 generators/s3_swf_upload/templates/controller.rb
@@ -29,7 +29,7 @@ def index
error_message = "Selected file is too large (max is #{max_file_size}MB)" if file_size.to_i > S3SwfUpload::S3Config.max_file_size
- expiration_date = 1.hours.from_now.strftime('%Y-%m-%dT%H:%M:%S.000Z')
+ expiration_date = 1.hours.from_now.utc.strftime('%Y-%m-%dT%H:%M:%S.000Z')
if params[:do_checks] == "1"
error_message = self.s3_swf_upload_file_error?(key)

0 comments on commit d9be753

Please sign in to comment.