Collapse AllExpand All

5. Uploading Files

In most cases, when files (e.g., images) are associated with your portal's content, those files can simply be uploaded within the content type's form. For instance, if you are publishing an article and you want to include a photo in your article, you simply upload the photo file inside the article content form.

However, there may be times when you want to upload files that are not linked to a specific content type―something like a PDF file, for example. Perhaps you need to upload an image so that you have a URL link which you can associate with a product on its Item master or you want to insert an image along with text on a standard page.

Here are the steps for uploading an independent file:

  1. Go to Admin > Content > Files.

  2. Select the Add file link.

  3. Locate the file on your computer's directory system by selecting the CHOOSE FILE button.

  4. Once selected, choose the UPLOAD button to upload the file. (Hint: Selecting the NEXT button will also perform the upload.)

  5. Select the NEXT button to be presented with the following choices:

    Public local files served by the webserver

    Select if you want the file to be publicly visible to anyone on the Internet.

    Private local files served by Drupal

    Select if you want restrict access to the file to only named users with granted access. Use this to upload private documents (e.g., PDFs) that only privileged users should see.

  6. After making your selection, select the NEXT button to move forward or the PREVIOUS button to go back.

  7. Provide an alternate name for the file in the File name field. You also have the option to supply alternate text and a title for the file. This information is helpful for SEO.

  8. Select the SAVE button to save the file or the PREVIOUS button to go back.

  9. The content is now saved as a file in your file library.

Caution

Image file names cannot have special characters or spaces in them (e.g., #, @, &, etc.). These will cause the image to not load properly.

Now, let's say you want to include a picture you uploaded to your file library within the body of an existing page. Here is how that would be done:

  1. Go to Admin > Content > Files.

  2. The information in the Path column shows the relative URL/location of the file. Highlight and copy the path for the image you want to insert.

  3. Keeping this path information on your clipboard, navigate to the page where you want to insert the image. (Hint: You will need to enter edit mode on the page.)

  4. Click your mouse into the body section of the page— at the point where you want to place the picture—then click on the Insert/edit image button.

  5. A screen will appear asking for the image's URL. Paste the URL/path information you copied here.

  6. You can also set other specifications, including alignment, size, etc.

  7. Then click INSERT.

  8. Once you've inserted the picture, click the SAVE button.

  9. You will be taken to the front-end view of your page, where you can see the changes you've made.

Note

If you want to link a .PDF file from a particular page, use the hyperlink feature. To do this, click on the Insert/edit link button. Then paste the relative path/URL information for the uploaded .PDF file into the space provided.