# Authentication for uploaded files

**URL:** <https://www.ruby-forum.com/t/authentication-for-uploaded-files/166032>\
**Category:** Rails\
**Created:** [April 21, 2009, 7:09am UTC](https://www.ruby-forum.com/t/authentication-for-uploaded-files/166032 "2009-04-21T07:09:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mokkai](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c2a13f/32.png) [@mokkai](https://www.ruby-forum.com/u/mokkai)\
**Post date:** [April 21, 2009, 7:09am UTC](https://www.ruby-forum.com/t/authentication-for-uploaded-files/166032/1 "2009-04-21T07:09:50Z")

</div>

how to set authentication for uploaded files ?

i am using paperclip plugin to upload files  
it using “public/system” folder to store files

the web server serving file from “public/system” folder  
directly

but i want to serve the file only after authetication

how to do that?

---

<div class="post-metadata">

**Author:** ![mokkai](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c2a13f/32.png) [@mokkai](https://www.ruby-forum.com/u/mokkai)\
**Post date:** [April 21, 2009, 7:20am UTC](https://www.ruby-forum.com/t/authentication-for-uploaded-files/166032/2 "2009-04-21T07:20:41Z")

</div>

On Tue, Apr 21, 2009 at 7:09 AM, Sniper A.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> how to do that?

I wrote a blog post about doing this with Nginx at  
[http://ramblingsonrails.com/how-to-protect-downloads-but-still-have-nginx-serve-the-files](http://ramblingsonrails.com/how-to-protect-downloads-but-still-have-nginx-serve-the-files)

Andrew T.  
[http://ramblingsonrails.com](http://ramblingsonrails.com)  
[http://www.linkedin.com/in/andrewtimberlake](http://www.linkedin.com/in/andrewtimberlake)

“I have never let my schooling interfere with my education” - Mark Twain
