Closed (fixed)
Project:
Drupal core
Version:
x.y.z
Component:
upload.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
27 Apr 2005 at 08:35 UTC
Updated:
14 Aug 2006 at 20:06 UTC
Sorry that I am new to Drupal and I hope this question is not silly to ask. How do I create a download page with restriction to different groups? I tried hard but I can't find any. I am puzzle on how drupal.org create the download page which is very nice. Could anyone advise me. thanks.
Comments
Comment #1
killes@www.drop.org commentedIn order to do that you first need to set the download option to "private".
And then you'd need to write a module that restricts the users' access based on their roles by implementing the _file_download hook.
For inspiration see here:
http://drupaldocs.org/api/head/function/upload_file_download
http://drupaldocs.org/api/head/function/fileupload_file_download
Comment #2
petertan commentedThanks for the information. But what if I want different files to be access by different group? Such as contributor group which access to premium download while normal user access to public areas?
Comment #3
petertan commentedHi, I have understand a bit of displaying in private and public...but one question, how do you attached a file which is already in your server? for example, you have \home\files\max.zip in your server... and it is 50MB. I don't think I want to reupload it thru attachment function.
Comment #4
magico commentedTaking this idea a bit further, the "upload" module could give an option to "associate" the same file to different nodes.
For example, I create a node and attach a file. Then I create another node and I want to refer an already uploaded file. What do you think?
Comment #5
magico commentedClosing in favor of this one.