By jesusDrupal on
Hi everyone!!
I'm trying to create a kind of repository where i can store pdf documents and then
allow users to download this pdf's.
Do you know a way to get it??? Is there a module that works like that???
Thank's in advance!!!!!!
Comments
Yet another candidate for CCK and Views. :)
What comes to mind for something like this would be
CCK (along with the file upload field type)
Views
Create a content type with CCK allowing file uploads, then use Views to display the list of PDFs available for download. Fast solution, plus it gets you used to using CCK and Views to do all sorts of amazing things with Drupal.
-dellintosh
CCK + Views + field type file
That's exactly what I did last night and it worked perfectly. What I needed was a repository for club newsletters, grouped by year. Here's what I did:
All in all, it turned out to be a pretty nice display, has paging, grouped by year, and can display files for a single year.
Thanks for the gret example!!
Hi wr5aw,
this is a real help. I have a question, i'm developing my own modules to get
my objectives. I think implementing this with CCK is not a problem to my applicaction, isn't it?
I mean, is there any problem if you develop a part of the applciation with CCK and another
with code?
Thanks a lot!!
It depends on your system requirements
I'm about to create a training database to keep track of club members, contact info, assets, classes completed, certifications, etc. Initially, I setup a members CCK type and created the required fields and the view. But, after thinking about it, decided to do a stand-alone relational db app instead. I'm just not too crazy about having everything tied to the node table. Plus, it'll make the data much more portable.
Back to my original post, I finally went live with the site I was working on. Here's the newsletter repository I built from CCK filetype and views - http://w5pc.org/newsletters/all.
There are several solutions.
There are several solutions. First, there are a couple for simple file management needs. There is http://drupal.org/project/filebrowser, with file metadata stored in descript.ion files, and http://drupal.org/project/webfm, with file management based on the directory structure, using AJAX.
The more thorough solutions involve attaching the files to Drupal posts of a special node type. This way, you can include metadata in the content, categorize them using taxonomy, and list them in tables by category or by combination of categories with the help of the views module. To attach files to to nodes you can use either the upload module (in core) or the filefield module (together with the cck module). In both cases, there are also modules which can store the files in a custom directory structure.
Need some help...
Hi cog.rusty!!!
Thank's for your response. I've a doubt. It's about the upload module. I don't know
how i can use it because i haven't found examples of its use. Do you know a web where
i could find them?? And do you know the name of any module to store the file in a directory,
as you said to me before??
Sorry but i'm a little lost with it because i'm newbie with Drupal.
Thanks a lot!!!
The upload module is
The upload module is included in Drupal and you can enable it in the admin/build/modules page. It simply adds an option in the editing form to attach one or more files to a post. If you want to store its files in a custom directory structure, you also need:
http://drupal.org/project/uploadpath (optional)
http://drupal.org/project/token (optional)
Alternatively, instead of the upload module, you can use:
http://drupal.org/project/filefield
http://drupal.org/project/cck
http://drupal.org/project/contemplate (optional, for theming)
http://drupal.org/project/filefield_paths (optional)
http://drupal.org/project/token (optional)
In both case, the idea is to create a special content type for files and then to attach one file per node, so that (a) the node can describe the file and (b) by tagging the node with some categories you are essentially tagging the file.
Then, the http://drupal.org/project/views module can produce listings or tables of your nodes/files by category etc.
The advantage of filefield is that it makes a node more structured, expecting a file link at a specific place in it, in a named field, which can make theming more precise. The advantage of the upload module is that it is lighter and simpler.