Authenticated download_endpoint

23 views
Skip to first unread message

Peter L

unread,
Sep 10, 2019, 8:42:30 AM9/10/19
to Shrine
Hi,

I just wanted to implement a authenticated download_endpoint (https://github.com/shrinerb/shrine/blob/master/doc/plugins/download_endpoint.md), but I can't find out how to do it.
I'm using rails - does anyone have a working example, on how the controller should look like?

Thanks!

Janko Marohnić

unread,
Sep 12, 2019, 11:17:11 AM9/12/19
to Shrine
Hi,

What are you using for authentication? AFAIK, Devise is the only one that has route-level authentication, so you can wrap that around your `mount` line.

Alternatively, you can use the rack_response plugin, which is lower-level than download_endpoint, and you can call it from your controller.

We plan to add support for download endpoint response to be generated from the controller, like *_endpoint plugins allow you to do.

Kind regards,
Janko
Reply all
Reply to author
Forward
0 new messages