Creating Pages with a list of uploaded files

goye2cz - January 12, 2009 - 10:08

Hello, I'm sorry if this question has been answered. I've been searching all morning.

I'm working on a site that requires pages to view and download uploaded files. One page maybe be a list of newsletters in PDF format and another maybe a list of seminars in mp3 format. Would be good to have fields indicating the date of the file and topics discussed, titles, and so on. There must be a way to do this fairly automatically I would think? I'm searching for a module but possibly I don't know how to work my search correctly. Any help? Thank you in advance.

file gallery....

goye2cz - January 12, 2009 - 12:16

Something like a gallery for files maybe...

You can create this yourself

WorldFallz - January 12, 2009 - 12:54

You can create this yourself fairly easily with the core upload and contrib views modules. Use upload to enable file attachments to nodes, then views to create lists of those nodes.

===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz

looks promising

goye2cz - January 12, 2009 - 14:11

Thank you for the reply. It looks promising and I have my homework to do now. ;-)

Also looking for same thing . . .

wayneware - January 12, 2009 - 14:16

If you are successful, would you be willing to share what you have done? I am looking for something very similar and would appreciate the help.

Looking for more info...

goye2cz - January 13, 2009 - 09:51

Thanks, this is what I need, I can tell. I've got it working halfway but have a couple of questions. If you could just point me in the right direction, that would be great. I just haven't been able to do a search that returns anything useful.

I don't know how to add some of the info while uploading. I would like to add a file description, but can't find anyway to do that. Also, I wonder if there's a way to make changes to files once they've been uploaded (or ones that have been uploaded via ftp), also with names and descriptions? The last issue is I deleted some files via ftp and they remain on the views page. Obviously that means a broken link which isn't good.

Still up for giving me some fishing tips? ;-)

Searching d.o. is ometimes

WorldFallz - January 13, 2009 - 12:44

Searching d.o. is sometimes somewhat of a black art, lol. It's a matter of figuring out the minimum number and correct words, as well as when to use quotes, to put in the search box. You'll get better at it over time.

To add info to your uploads, simply add fields to the content type you created for uploading the files (you'll need the http://drupal.org/project/cck module for that). Another option is to create a fieldgroup for your attachment info with a filefield for the upload and whatever other fields you want.

To make changes to attached files, you need to remove them an add another. Manipulating them through the file system (with ftp or any other way) is a bad idea-- drupal will have no idea what you've done and as you found out, your nodes will be out of step with their associated files. Deleting files through the file system has no effect on their drupal node-- which is why they still show up in views.

If you really want integrated file management you may want to take a look at the http://drupal.org/project/webfm module.

s===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz

I've made it happen

goye2cz - January 13, 2009 - 16:20

I've made it happen in a very basic way. The thing is I can't seem to get the descriptions visible when using CCK fields for uploading files. I must have tried about 50 different things.

What I did that worked was I used the file attachment module that came with Drupal and it's description field works fine. It shows up in the view I created. Of course when using that, the allowed extension of uploaded files is general across all file attachments (I guess... could be wrong). So I'm still at a loss as to how to make CCK work in this way.

The other thing that comes to mind is, if I ever want to delete some of the files, like you said, Drupal won't know what's going on and the link will stay. How do I work with this?

Lastly, some of the files that contributors will need to upload to the site are large mp3's. Some as large as 50mb. In the past I've just had them upload via ftp and create a static page for that myself. I'd really like to get away from doing that.

If you mean the cck

WorldFallz - January 13, 2009 - 16:40

If you mean the cck filefield field type, i never noticed before, but you're right it doesn't seem like description is accessible-- you might want to check the module's issue queue. Seems a bug to me.

As for allowed extensions, you should be able to create different filefields with different allowed extensions iirc.

In order for drupal to know what files have been deleted, you need to delete the files through the drupal interface-- i don't know of any way around that.

How large a file you can upload can be configured in drupal, you'll have to make sure the host/server allows files of that size with PHP first.

===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz

thanks

goye2cz - January 20, 2009 - 09:29

Thank you for your comments.

The situation I find myself in now is that there are so many things I need to figure out and they seem inter-related. I don't know what to tackle first. This is a multilingual site. Of course download pages will need to be available for both languages, at least the explanations of what the files are. Menus and categories will have to be translated... Man, it's too early in the day for a headache this big. Hehe.

I had no idea how complicated this site was going to be when I said yes. :-)

I've tried it

goye2cz - January 29, 2009 - 15:04

I've looked into it and tried a few things. The webhost won't allow me to make the necessary changes. Am I correct in understanding that files such as mp3's that I upload through something like filezilla won't be recognized by the CMS and won't be able to automatically generate a page for the file dowload? So I'm left with creating static download pages again? I think there must be a way to make this work...

Any thoughts?

_

WorldFallz - January 29, 2009 - 15:13

Yes, files uploaded outside of drupal won't be recognized by drupal by default. There may be modules that address this, but offhand I can't think of any. One option may be to use the http://drupal.org/project/emfield module, but again, i'm not sure.

===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz

 
 

Drupal is a registered trademark of Dries Buytaert.