Ruby on Rails Saturday, February 16, 2019

Thanks

On Sat, Feb 16, 2019 at 10:41 PM Rob Jonson <rob.jonson@gmail.com> wrote:

On Saturday, 16 February 2019 04:27:51 UTC, David Merrick wrote:
Is there a way stop logged in users copying and pasting resources in a S3 Bucket to other people?

The easiest way to handle this is to deal with the doc through ActiveStorage where you let rails upload it into an amazon s3 bucket.

Active Storage will then generate an indirect link which goes through your app, and returns a signed time-limited AWS link.

You can add logic at the active storage controller to make sure the user is logged in, and if they copy and paste the redirected link - it won't work for long.

There is some good chat here about how it would be really nice to avoid this complication
but it should give you some background info anyway!

Alternatively, you could roll your own - I assume the private content doc you linked is what rails is using under the hood.


--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/22a63ca8-cbee-4b76-b39d-8e6d007f3925%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Dave Merrick

Daves Web Designs

Website http://www.daveswebdesigns.co.nz

Email merrickdav@gmail.com

Ph   03 216 2053

Cell 027 3089 169

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CA%2B%3DMcKYm_-L%3DCDMpVD%2BcsHe4J%2BNrWCbCzqV%2BWP%3DoZwnsNpG2Kw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment