A simple download page?
ckleiman - May 10, 2009 - 13:49
Am looking for a simple download module to use for my download files. Anonymous can have access only. No upload permission. Similar to Doc Man or Repository used in Mambo. WebFM doesn't work for anonymous unless you give full admin permissions. Any recommendations for a frustrated newbie?

You could define a new
You could define a new content type using CCK representing files to download. This should at least contain a filefield into which a file can be uploaded; you might want to add other fields, like a short description, a date when the file was released, a version, or a link to a Copyright text (i.e., some other node/piece of context in your site). Adding taxonomy terms might also be a good idea in order to categorize your files.
You'd then use Views to create a listing of all (published, say) files for download. This can be output in a list or table view, and Views also lets you define which of the fields of the new content type are displayed, and in which order. You could further group the output by taxonomy terms, or (using arguments) only display those files that belong to a given category. Other options include the display of the most recent files in a block etc.
Finally, you would allow public access to these views, but only allow yourself or site admins to create a new file nodes (i.e., pieces of content of that new content type) - that is, to upload new files and provide the relevant meta data.
Hope this helps.
Sounds like a lot of work.
Sounds like a lot of work. Need to use CCK, filefield, date and Views to make this, correct? I guess I don't have a lot of choice. Anyway, at least I'll be able to make it custom to my specific needs. I'll give it a try. Thanks for the tip!
Actually, it doesn't take
Actually, it doesn't take that much... Setting up the content type is a matter of minutes, really. The problem is more that need to have an idea what information you want to provide along with the file itself. For example, if you don't need a date, you don't need the data CCK field...
I played around with Views for half an hour or so before I got what I wanted - and I never did anything with Views before (but I had done a lot of reading and looking screencasts). There's a learning curve, but the flexibility Views gives is just tremendous - and well worth the effort.
How get filefield info
I like the CCK, Views, and Filefield way. But how can one get the filefield information like file size and file type (.pdf, doc,etc) to show in the view.
_
Either use a 'file' view type or add a relationship for the filefield to the node view.
_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.
_
As WorldFallz points out, a relationship from the node view to the file field does it. It comes with the nice side effect that the view (when presented as a table) can be sorted by the file name.
Can you explain more
Hi I am just learning Drupal. I am not sure what you mean when you saw to create relationship from node view to file field?
Heres what I have
Document CCK with
Title - Name of file, Body the Description.
Document - filefield
File View - viewfield
Created a View of type File
Set Default to row style to Fields add the files I like to see. Did not change anything else.
On the Document Page view
Added the File View field to the fields list.
When view page show the document and all file field information for all Files upload.
How do I create the relationship for Node view (document) to the File (view)?
Any help would be greatly appreciated. I know I am close just can not figure out the correct relationship.
Thank you,
Pam
Oh, we mislead you,
Oh, we mislead you, probably... In my content type, I have a filefield to hold (and upload) the file, and also a title, plus additional fields for a description (e.g., the body) and version, release data,... - whatever you need. There's no viewfield in there, though; the relationship happens within the view that displays the files.
I also have a view to show the downloadable files. In my case, that view is a node view (i.e., it lists nodes); in the filter section, I restrict the nodes displayed to be of type 'File' (or however you call your content type for the downloadable files). I my basic settings, I also chose the table style, so that I get a nice HTML table listing all my files - but again, you might choose another option. In the 'Fields' part of the Views configurationj screen, I can select the 'Content: File' filed to be displayed, plus any other field from my content type. The 'Content: File' item can be configured to give you a link that allows downloading the file - but you don't have access to the other information of the file, nor can can you sort the table (in my case) for the file names.
The way out is in the 'Relationships' tab of the configuration screen for the view. Add a new relationship to 'Content: File - fid', go through the short configuration of that relationship giving it a name etc., and save your view. When visiting the list of available fields now, you'll see additional items like 'File: Name' and 'File: Size'; I believe 'File' is the name you gave the relation. So instead of putting the 'Content: File' into your view, you can now display 'File: Name' and 'File: Size'. These items also make sortable columns in the table style - and the File: Name can be configured so that it is a link to the file.
Background: When only listing the nodes, all that's available to Drupal is the file's ID, but not all of the file related data like the file size etc. - that's stored in a different data base table. In order to access this information, you (technically) need to do a join between the data base tables on the file ID. In data base speak, that's a one-to-one relation between two data base tables. And that's what Views let's you create via it's 'Relatonships' tab...
Hope this helps!
Thank you
It helped it works now! For once I slow down, read, and step though what you said. It worked and it was so simple. Great job explaining. Plus a quick respond. I think I have a little more learning/understanding to do on the whole Views Relationships.
Thank you!