Upload: collaborate with files

Last modified: May 20, 2009 - 18:04

The upload module allows users to upload files to the site. The ability to upload files to a site is important for members of a community who want to share work. It is also useful to administrators who want to keep uploaded files connected to a node or page.

Users with the upload files permission can upload attachments. You can choose which post types can take attachments on the content types settings page. Each user role can be customized for the file size of uploads, and the dimension of image files. Note: you must first give a user role upload permissions before you can customize some of these settings.

You can

  • enable/disable uploads for individual content types at administer >> content management >> content types.
  • administer storage location of uploaded files at administer >> site configuration >> file system
  • configure file size, file extensions, and other user role defaults at site configuration >> file uploads.
  • control who can upload and view attached files at administer >> user management >> permissions.

The maximum upload size is controlled by your PHP environment. The standard PHP default is 2 MB. If you need to alter this, see the handbook page on how to Increase upload size in your php.ini.

Modifying Private Files

NOTE: If you have private download method enabled:
Administer > Site Configuration > File System > Download Method: Private

Do NOT modify uploaded files outside of Drupal. When you upload a file as an attachment to content, Drupal stores the file size in the database and it is used to generate the header information when it is downloaded. The ONLY way you should modify a file is to delete the attachment and upload the new file.

Files and Revisions

The upload module does not handle file revisions in the sense of the Microsoft Word "track changes" feature. However, if you attach a new version of a file with the same file name to a node, Drupal will automatically modify the filename to avoid conflicts on the filesystem. You then have the option of un-checking the "List" checkbox for the previously attached file.

For more information, check the File Management category of contributed modules.

 
 

Drupal is a registered trademark of Dries Buytaert.