Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.

#1 Dec. 15, 2010 08:29:12

N.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Controlling File Downloads.


What is the best way to allow authorized downloads
to specific users in Django.

We have 2 possible scenarios that could work for us.

1. A download directory where any user can download any
file in the folder.

or

2. Granting specific rights to specific users to download a specific
file
or set of files.

Any suggestions?

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 Dec. 15, 2010 11:16:35

e.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Controlling File Downloads.


If you're using apache you might want to consider wiring your app to
generate mod_auth_token URLs and have apache receive these.

On Dec 15, 8:29 am, NoviceSortOf <dljonsson2...@gmail.com> wrote:
> What is the best way to allow authorized downloads
> to specific users in Django.
>
> We have 2 possible scenarios that could work for us.
>
> 1. A download directory where any user can download any
>    file in the folder.
>
> or
>
> 2. Granting specific rights to specific users to download a specific
> file
> or set of files.
>
> Any suggestions?

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#3 Dec. 15, 2010 18:15:51

M.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Controlling File Downloads.


Please check the classcomm project for how to do this. We determined
the best/fastest approach would be to use Apache mod_auth_token and
generate secure URLs using a custom template tag. You can find code
and instructions for how to do that @http://classcomm.googlecode.com/and across the Internet. This is the best approach because the files
are severed off the web server pretty much like any static overheard
file. Then in your view code you check a User's permission to the
file before generating them the time-sensitive URL.

Cheers!
Matteius

On Dec 15, 5:16 am, "euan.godd...@googlemail.com"
<euan.godd...@gmail.com> wrote:
> If you're using apache you might want to consider wiring your app to
> generate mod_auth_token URLs and have apache receive these.
>
> On Dec 15, 8:29 am, NoviceSortOf <dljonsson2...@gmail.com> wrote:
>
>
>
> > What is the best way to allow authorized downloads
> > to specific users in Django.
>
> > We have 2 possible scenarios that could work for us.
>
> > 1. A download directory where any user can download any
> >    file in the folder.
>
> > or
>
> > 2. Granting specific rights to specific users to download a specific
> > file
> > or set of files.
>
> > Any suggestions?

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

Board footer

Moderator control

Enjoy the 23rd of October
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support