Sandy wrote:
My specific need is to upload the file from one web page, while allowing a user (who has logged into the site) to then (for a limited amount of time) to access that page using https and a link on a page served to that user.
Does anyone have good tutorial or example code which addresses this issue?
I haven't seen a tutorial for it, but you may want to take a look at the docs for aws-s3 here: http://amazon.rubyforge.org/
Take a look at the section "Accessing private objects from a browser", which goes into detail about SSL and link expiration. Paperclip also provides options for these settings, take a look at the docs for the S3 module: http://rdoc.info/projects/thoughtbot/paperclip
Excerpt:
s3_permissions: This is a String that should be one of the “canned” access policies that S3 provides (more information can be found here: docs.amazonwebservices.com/AmazonS3/2006-03-01/RESTAccessPolicy.html#RESTCannedAccessPolicies) The default for Paperclip is :public_read.
s3_protocol: The protocol for the URLs generated to your S3 assets. Can be either ‘http’ or ‘https’. Defaults to ‘http’ when your :s3_permissions are :public_read (the default), and ‘https’ when your :s3_permissions are anything else.
s3_headers: A hash of headers such as {‘Expires’ => 1.year.from_now.httpdate}
Hope this helps!