I have many large (6 to 13 mb) pdf and image files that I would like to upload (actually just move around on my webserver from my old html site to the new drupal installation).

Can I:

1. Access files in sites/default/files without having to upload them from a node when I'm creating that node?
For example, attach a file, or display an image from the files directory without having to upload during node creation/editing?

2. Create subdirectories such as sites/default/files/subdir/subsubdir and access files within those subdirectories?

thanks,
Dave

Comments

vm’s picture

yes. you can use relative urls in content (a node) to link to the files in a files folder.

daveslc’s picture

What if I want to 'attach' the pdf to the node? How could I do that? The filesize precludes uploading them with the file attachment button.

thanks,
Dave

vm’s picture

change the max file size and post max settings of your host with a custom php.ini file.

Your hosts documentation should have a method forward for that.

you could try:
creating a new text file called php.ini
adding to it

; Maximum size of POST data that PHP will accept.
post_max_size = 10M

; Maximum allowed size for uploaded files.
upload_max_filesize = 5M

Upload it to the same folder drupal is residing in.
Do a phpinfo() and check to see if the settings are being altered.

If so, adjust the 10 and the 5 to be what you need keeping post_max_size larger than upload_max_filesize

daveslc’s picture

Thanks. But, I just want to access the files, not upload them. The method you describe will work for one file at a time to upload, but that is much less than ideal.

I have over 100 pdfs currently organized in dir/subdir.

thanks,
Dave

vm’s picture

Then what do you mean by "attach" ? If you don't want to use HTML and you don't want to use drupal's upload method? I'm not sure what other method there is.

daveslc’s picture

Thanks. I think the html method you describe should work, but that too will be cumbersome because it entails tracking down the link for each file. What drupal needs is some sort of 'file browser' that allows one to browse through a directory structure to either get the path of the file, or attach an existing file to a node.

I had been thinking that there might be some advantage to the upload method (and was hoping to bypass the actual upload part since that is not feasible with my site) such as listing all the uploaded files. In rethinking, this might not help me.

vm’s picture

maybe the imce.module but I've never tried it. There are module listed in the file management category of downloads that may prove fruitful including one called filebrowser. I've never tested such methods so all I can do is point in their direction

good luck