Drupal File Upload

File Upload is a special Content Type in our instance of Drupal that allows you to store information associated with a file. Currently, we allow you to upload most image and document file types. You can place these File Uploads directly on a page, as you would a news story or profile, or you can add them to a hidden page and then embed the file inside another piece of content.

Create a File Uploads Page

Most of the time you will want to first upload your files to a hidden page on your portion of the site that can be used to organize and store the files before you embed them in your content. We have established a convention of titling these pages File Uploads and hiding them from the menu. Note that even though they are hidden from the menu they are still publicly accessible, as are their contents. See the Permissions section below for information on how to restrict access.

Most areas of the site will already have a File Uploads page, but if yours does not, you can add one using these steps:

  1. Browse to your portion of the site and log on.
  2. Click on Add Sub-page in the orange Sub-pages section of the Edit Console.
  3. Enter File Uploads, or whatever you'd like to call the page, in the Page name field.
  4. Click on the Menu and layout tab and check Don't show this page in the menu.
  5. Click the Create Sub-page button at the bottom of the form.

You can also create sub-pages of your file uploads page to better organize your files. You might want to create a new sub-page for each month, or for various programs within your area.


The File Upload inherits the permissions of the page on which it is placed. Even if it is placed on a "(hidden)" page, those are only hidden from the menu. They are still publicly readable, as are their contents, if someone knows the address. If you have a sensitive file that should not be publicly visible, first consider whether Drupal is the best place for that file. It may make more sense to host it on MiddFiles or Google Docs.

If you decide that you need to upload a document to Drupal which should not be public, you will need to create a new page with the appropriate permissions. To do that:

  1. Create a new sub-page. Name this something like "Midd Only File Uploads" and hide it from the menu.
    1. Browse to an existing File Uploads (hidden) page on your site.
    2. Click on Add Sub-page in the orange Sub-pages section of the Edit Console.
    3. Enter Midd Only File Uploads, or whatever you'd like to call the page, in the Page name field.
    4. Click on the Menu and layout tab and check Don't show this page in the menu.
  2. In the Permissions section of the page settings, make sure that the Read checkbox to the right of Everyone is unchecked.
  3. Add the institution group to the Group permissions and give it only Read access. The institution group can be found within Groups and then General in the group menu. This group contains everyone at Middlebury, MIIS, the Language Schools, Schools Abroad, etc. You may wish to use a different group if you only want this visible to faculty, staff, and/or students, but institution is the go-to group for all Middlebury-related people.
  4. Upload your documents to this new page and described below.
  5. Click the Create Sub-page button at the bottom of the form.

Creating File Uploads

Once you have your page(s) all set up, you're ready to upload the files to the site. To do this:

  1. Navigate to your File Uploads (hidden) page.
  2. Click Add in the blue Contents section of the Edit Console.
  3. Select File Upload from the list of content types in the middle of the page.
  4. Click the Browse button in the Files to upload section.
  5. Select the files to upload from your desktop or mapped drive.
  6. Click the Upload button.
  7. Give each image or document a Title. This will be displayed above the image, if your file is an image, or used as the link text, if your file is a document. By default, the title will be the file name.
  8. (optional) Add Caption text. This will be displayed below the image or document when the full File Upload node is displayed, though not (currently) when it is embedded in other content.
  9. (optional) Add a URL if you would like to wrap the image in a link to a different page. This only works if your file is an image. It will be ignored for documents.
  10. If you added a URL, you can choose how that link will work in the Target drop down.
  11. Click Save to create the File Upload(s).

Embedding in Other Content

Now that you've uploaded your file to Drupal, you can add it to other content by embedding it using the WYSIWYG editor.

  1. Edit or create a piece of content, other than a File Upload.
  2. Place your cursor in the editor window where you would like the file to appear.
  3. Click the Select a file upload button. This looks like overlapping photos of mountains. It is the leftmost button in the third row of the editor.
    1. Browse to your File Uploads (hidden) page in the tree browser in the left pane of the window that opened and click on it.
    2. Click on the image or document you want to use in the list on the right.
    3. (optional) Add a Title. Title text is used in the tool tip when a user hovers their mouse over the image. Adding title text makes it easier to understand the context of an image and improves usability.
    4. (optional) Add some Alternate text. Alternative text is used by screen readers, search engines, and when the image cannot be loaded. By adding alt text you improve accessibility and search engine optimization.
    5. Select the image style you want to use from the Style dropdown. It is suggested that you use the next-highest value from the size of the image you want to display, as this will improve page load time. For example, if you have a image that is 1280x1024 pixels, but want to display it in your content at 300px wide, choose "Standard (450x450)" from the style dropdown. This will create a smaller copy of the image at the appropriate dimensions so that it will load faster. See the Region Dimensions documentation for information on how wide each section of the page is.
    6. Check the Clicking on this image shows it full-size checkbox to wrap the image in a link that will show the full image in a pop-out dialog. If you later decide to add a link around the image to a different location, the pop-out dialog will not be shown.
    7. Click the Insert button.
  4. Save your piece of content.

Replacing a File Upload

To replace a file,

  1. Locate the file that you want to replace in the File Upload's area of your site.
  2. Click the Edit link for the File Upload item.
  3. In the Edit form, find the Upload field and click the Edit button.
  4. Click the Replace button, and browse your computer to find the new file.
  5. Save your changes

All links to that file upload (if you've linked to it with the "Select a File Upload" button - see above) will be updated to link to the new file that you've replaced at the source.

Finding files by URL

Often, people will reference files by URL in emails and other web-sites. When a link to a file stops working, it isn't always obvious where it was originally uploaded to. If you have a file-URL that you want to locate you can find it in the site with the new "Files" feature as follows:


  • First log into the site
  1. Click the "Files" link in the edit-console.
  2. Enter the file-URL in the "Find a File" form.
  3. Click "Find!"
  4. Click the edit link of the file to load its settings form in the context of its original container page.
Powered by MediaWiki