Blog

Managing Files - Part 2

Posted: 05-Mar-2013
Category: Using PyroCMS

In Managing Files Part 2 we will see how the Files module interface makes it a breeze to upload your files into the folders that were created in Part 1.

Now - before we upload any files, it is important to note that most hosting providers impose a file size limitation on files that can be uploaded through a web interface. A general rule of thumb is 2MB. But you should check with your hosting provider before you begin uploading.  With image files, it is a good idea to have them prepared for your needs on your site before you get to this stage. Typically, you would be uploading image files in various formats. The file formats usually employed for display on a website are of .jpg, .png and .gif format. When preparing your files ensure that you have selected the right format, have sized the dimensions of the image to the desired width and height, and if .jpg files, have been compressed for optimum file transfer speed without impacting on the quality of the image itself. This site has a good explanation of image optimisation and if you dont have access to a good image manipulation program such as Photoshop or Photoshop Elements, there are sites like this one which provide an online service for this purpose. If you are uploading pdf files, make sure that they are less than the max file size allowed by your hosting provider.

There are a number of methods available to you to upload your files, including the Pages and Blog modules. In this tutorial we will be using the Files module and later we will review Pages and the Blog module file upload/insert options.

Lets continue from where we left off in Part 1 of Managing Files. We have a number of folders that we have previously created and we need to upload some files which we will be using later in a page on your site.

We have a couple of great image files that we would like to include on a webpage and so the best place to upload them to is the Page Images folder. 

  • Right click on Page Images folder and select Upload - or
  • Double click on the Page Images folder and right click on the blank area and select Upload.

You will be presented with the Files Upload dialog modal window:

Upload dialog modal

Having ensured that the files you wish to upload are suitable you can either Drag and Drop them from your Finder or Windows Explorer onto the Drop Zone on the Upload dialog modal window. Here are a couple of files that have been selected for upload.

Files waiting for upload in the Uploader

These two files are waiting in a queue for upload. Before the upload is initiated, you can resize the files to a different pre-set dimension by way of the Width and Height selects and also include Alt text for your image  Alt text is ALTernative text you associate with your image and can be viewed or read by people with images turned off in their browser, or vision impaired accessing your website. When all is ready, just click the Upload button and your files will be uploaded and saved in your previously selected folder.  The currently selected folder is easily identified by the special marker in the LHS column of the Files module.

In PyroCMS 2.2.x there is a handy Search facility so for folders with lots of images, you can always search for the file if you need to make changes to it.

Uploaded files

With your files now in place in their intended folders you may make changes if necessary by right clicking on the image. In this case the Details section of the dialog box has been moused over. You can also make changes to your file by clicking on it and make use of the action buttons at the top of the files modal window.

Edit file attributes

By selecting the Details option we can make changes to the Alt tText, add a keyword to be associated with the image and edit the description of the image.

Image details

This concludes this segment of the Managing Files tutorials. In Managing Files Part 3 we will find out how to add images to your web page and blog content.