Using the Media module in Drupal Commons, you and your authorized site visitors can easily upload files and media to your website.
Note: This feature uses the Commons Media module, which is enabled by default. If you cannot add media items to content nodes, be sure that the module is enabled on the Modules page at Menu > Modules.
To manage your website's uploaded files, go to Menu > Content, and then click the Files tab.
The Content page lists all of your website's uploaded files and media. You can display the files either as a list or as a collection of thumbnails.
You can also use this page to evaluate where files and media are being used on your website. Each file in the list has an entry in the Used in column that shows how many content nodes use the file. Click the places link to view a complete list of nodes that use the file resource.
Adding media to your site
You can add files and media using two different methods:
* Click Add file on the Content page.
* Add a file directly to a content node.
Regardless of the method that you select, you'll then either be able to directly upload a file to your website or to link to media at an external web URL.
To upload a file to your website, click the Web tab, choose the file that you want to upload, and then click Upload.
Your Drupal Commons website uses the default file settings to determine the size and type of file that you can upload. To change these settings, go to Menu > Configuration > File settings.
After you upload the file, click Next to enter additional information to use with the file, including Alt and Title text. You can also add a URL redirect to the image in the URL redirects section to make it easier to directly access.
Click Save to save your file for use.
You can also embed a link to a file or media item that's hosted by another website. The linked file becomes an actual media resource that you can use, similar to how you use files and media that were actually uploaded to your website.
After you enter the URL for the file or media item, be sure to click Submit.
The next page allows you to enter additional information to use with the file resource, including Alt and Title text, and URL aliases. Click Save to save your file resource for use.
Managing file resourcesThe Content page at Menu > Content > Files allows you to manage your file and media resources, including editing their contents and removing them when they're no longer required.
To either modify a file resource's attributes, including its title or alt text, or to replace the file resource with different contents (another image or media item), find the file resource on the Content page, and then click its Edit link.
Updating the URL aliasBy default, the Pathauto module examines the file resources that are uploaded to your website, and adds a URL alias that allows the file to be directly accessed (for example, http://[site_URL]/file/12). If you modify your website's file naming settings (available at Configuration > URL aliases > Patterns), you can update your previously uploaded files to use the new patterns for URL aliases by completing the following steps:
1. On the Content page, select the check boxes to the left of the file resources that you want to modify.
If you want to modify all of the file resources displayed on the Content page, select the check box to the left of the column headers for the table of file resources.
2. In the Update options list, click Update URL alias.
3. Click Update.
Drupal Commons provides several methods for you to remove file resources from your website when you no longer require them, including the following:
*Deleting individual file resources manually
*Deleting multiple file resources
*Marking files as temporary for automatic removal
Deleting individual file resources manually
To permanently remove a single file resource from your website, find the file resource on the Content page, and then click its Delete link.
Deleting multiple file resources
If you have several file resources that you want to permanently remove from your website, complete the following steps:
1.On the Content page, select the check boxes to the left of the file resources that you want to delete from your website. If you want to remove all of the file resources displayed on the Content page, select the check box to the left of the column headers for the table of file resources.
2.In the Update options list, click Delete selected files.
Marking files as temporary for automatic removal
Sometimes you may have file resources that you want to be available for use and display on your website only for a short time. You can have Drupal Commons remove these temporary files for you after you're finished with them.
During the next cron run, your website will remove all temporary file resources that are older than the value in DRUPAL_MAXIMUM_TEMP_FILE_AGE (by default, 6 hours).
When you create a file resource on Drupal Commons, the file resource is a permanent file resource and will not be removed during cron runs. You must specifically indicate that a file resource is temporary.
To indicate that one or more file resources are temporary file resources, complete the following steps:
1. On the Content page, select the check boxes to the left of the file resources that you want to indicate as temporary.
If you want to indicate that all of the file resources displayed on the Content page are temporary, select the check box to the left of the column headers for the table of file resources.
2. In the Update options list, click Indicate that the selected files are temporary and should be removed during cron runs
3. Click Update.
Temporary file resources are not displayed differently than permanent file resources on the Content page. Be sure to note which files are temporary, because they will be removed without additional warnings or indications during an upcoming cron run.
To indicate that a temporary file resource is actually permanent and to avoid its removal during an upcoming cron run, use the previous steps, but in the Update options list, click Indicate that the selected files are permanent and should not be deleted.