I am able to use Paperclip to save files to Amazon''s S3 storage. Once saved, the files are available using a URL associated with the bucket and filename. I have not been able to find a good tutorial which clearly explains how to save a file to S3 (using Paperclip) whereby it can only be retrieved using https, and only for a limited time period (which I understand is a function of S3). 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? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Take a look at: http://scottmotte.com/archives/181.html Regards, Daniel Gaytán <http://survey.richapplabs.com/index.php?sid=62661&lang=en> 2010/8/9 Sandy <sandy.asman-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>> I am able to use Paperclip to save files to Amazon''s S3 storage. Once > saved, the files are available using a URL associated with the bucket > and filename. > > I have not been able to find a good tutorial which clearly explains > how to save a file to S3 (using Paperclip) whereby it can only be > retrieved using https, and only for a limited time period (which I > understand is a function of S3). > > 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? > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Daniel, While I''m sure that you had good intentions, the tutorial to which you referred is absolutely unrelated to the question I asked. Specifically, I clearly stated that I know how to use Paperclip to upload files to S3, and to create a url to retrieve the files. My question was whether anyone knew of a tutorial relating to https, as I am interested in being able to control access to the uploadeed files. In the future, may I suggest that no answer is better than a wrong answer or guess, which simply makes others, who may know the answer, refrain from looking at the question. Sandy On Aug 9, 3:15 pm, Daniel Alejandro Gaytán Valencia <daniel.gaytan.n...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Take a look at: > > http://scottmotte.com/archives/181.html > > Regards, > Daniel Gaytán > <http://survey.richapplabs.com/index.php?sid=62661&lang=en> > > 2010/8/9 Sandy <sandy.as...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > > > > I am able to use Paperclip to save files to Amazon''s S3 storage. Once > > saved, the files are available using a URL associated with the bucket > > and filename. > > > I have not been able to find a good tutorial which clearly explains > > how to save a file to S3 (using Paperclip) whereby it can only be > > retrieved using https, and only for a limited time period (which I > > understand is a function of S3). > > > 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? > > > -- > > You received this message because you are subscribed to the Google Groups > > "Ruby on Rails: Talk" group. > > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To unsubscribe from this group, send email to > > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > > . > > For more options, visit this group at > >http://groups.google.com/group/rubyonrails-talk?hl=en.- Hide quoted text - > > - Show quoted text --- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 10 August 2010 01:29, Sandy <sandy.asman-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: Please don''t top post, it makes it difficult to follow the thread. Insert your reply at appropriate points in the previous mail. Thanks.> Daniel, > > While I''m sure that you had good intentions, the tutorial to which you > referred is absolutely unrelated to the question I asked. > > Specifically, I clearly stated that I know how to use Paperclip to > upload files to S3, and to create a url to retrieve the files. My > question was whether anyone knew of a tutorial relating to https, as I > am interested in being able to control access to the uploadeed files. > > In the future, may I suggest that no answer is better than a wrong > answer or guess, which simply makes others, who may know the answer, > refrain from looking at the question.I don''t think that getting shirty with those trying to help is likely to get you anywhere. Often those reading mail only have time to skim messages and may make suggestions that they think may be helpful, but may not turn out to be so. You might to better by gracefully pointing out that the suggestion does not help and ask for further suggestions. Colin> > Sandy > > On Aug 9, 3:15 pm, Daniel Alejandro Gaytán Valencia > <daniel.gaytan.n...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> Take a look at: >> >> http://scottmotte.com/archives/181.html >> >> Regards, >> Daniel Gaytán >> <http://survey.richapplabs.com/index.php?sid=62661&lang=en> >> >> 2010/8/9 Sandy <sandy.as...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >> >> >> >> > I am able to use Paperclip to save files to Amazon''s S3 storage. Once >> > saved, the files are available using a URL associated with the bucket >> > and filename. >> >> > I have not been able to find a good tutorial which clearly explains >> > how to save a file to S3 (using Paperclip) whereby it can only be >> > retrieved using https, and only for a limited time period (which I >> > understand is a function of S3). >> >> > 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? >> >> > -- >> > You received this message because you are subscribed to the Google Groups >> > "Ruby on Rails: Talk" group. >> > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org. >> > To unsubscribe from this group, send email to >> > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> >> > . >> > For more options, visit this group at >> >http://groups.google.com/group/rubyonrails-talk?hl=en.- Hide quoted text - >> >> - Show quoted text - > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Aug 10, 12:29 am, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 10 August 2010 01:29, Sandy <sandy.as...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Please don''t top post, it makes it difficult to follow the thread. > Insert your reply at appropriate points in the previous mail. Thanks. > > > Daniel, > > > While I''m sure that you had good intentions, the tutorial to which you > > referred is absolutely unrelated to the question I asked. > > > Specifically, I clearly stated that I know how to use Paperclip to > > upload files to S3, and to create a url to retrieve the files. My > > question was whether anyone knew of a tutorial relating to https, as I > > am interested in being able to control access to the uploadeed files. > > > In the future, may I suggest that no answer is better than a wrong > > answer or guess, which simply makes others, who may know the answer, > > refrain from looking at the question. > > I don''t think that getting shirty with those trying to help is likely > to get you anywhere. Often those reading mail only have time to skim > messages and may make suggestions that they think may be helpful, but > may not turn out to be so. You might to better by gracefully pointing > out that the suggestion does not help and ask for further suggestions.He started off by saying the poster had good intentions. I don''t see the problem. You on the other hand has done nothing but to gripe and lecture at everything OP has done.> > Colin > > > > > > > Sandy > > > On Aug 9, 3:15 pm, Daniel Alejandro Gaytán Valencia > > <daniel.gaytan.n...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> Take a look at: > > >>http://scottmotte.com/archives/181.html > > >> Regards, > >> Daniel Gaytán > >> <http://survey.richapplabs.com/index.php?sid=62661〈=en> > > >> 2010/8/9 Sandy <sandy.as...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > >> > I am able to use Paperclip to save files to Amazon''s S3 storage. Once > >> > saved, the files are available using a URL associated with the bucket > >> > and filename. > > >> > I have not been able to find a good tutorial which clearly explains > >> > how to save a file to S3 (using Paperclip) whereby it can only be > >> > retrieved using https, and only for a limited time period (which I > >> > understand is a function of S3). > > >> > 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? > > >> > -- > >> > You received this message because you are subscribed to the Google Groups > >> > "Ruby on Rails: Talk" group. > >> > To post to this group, send email to rubyonrails-talk@googlegroups.com. > >> > To unsubscribe from this group, send email to > >> > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscrib e-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > >> > . > >> > For more options, visit this group at > >> >http://groups.google.com/group/rubyonrails-talk?hl=en.-Hide quoted text - > > >> - Show quoted text - > > > -- > > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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! -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.