File Upload Preferences

This section of the Control Panel is for the management of file upload destinations. It is where upload directories are created and deleted. File upload destinations determine where you will be able to upload files. You can create a separate destination for each weblog or use the same destination on multiple weblogs to ensure that they all store their files in the same location.

Main Screen

The main File Upload Preferences screen shows a table of all the existing upload destinations. It lists the destination name and provides links to edit and delete the destinations.

File Upload Preferences main screen

The Create a New Upload Destination link takes you to a screen allowing you to create a file upload destination.

Create a New Upload Destination

A link off of the main File Upload Preferences page brings up this screen. On this screen you define the new upload destination.

Create a New Upload Destination screen

Descriptive name of upload directory

This is the descriptive name of the upload destination. It is a required field and must be unique, but spaces are allowed. This is the name of the choice that will appear when uploading files.

Server Path to Upload Directory

This is the path to the upload directory for this destination. It is a required setting. It may either be the server path (ex: /home/user/example.com/http_docs/uploads/newdestination) or a relative path from the perspective of the Control Panel (ex: ../uploads/newdestination/).

Important:
The directory you specify here is not created automatically (the system would need to have permissions on the server in order to create and set up the directory). Therefore, you will need to set up the directory yourself:

  1. Create the specified directory on the server. This is often done either through FTP or through a control panel on your web host.
  2. If you are on a Unix-based server, you must set the permissions of the new directory to 777. (For Windows-based servers you do not need to do this.)

URL of Upload Directory

You will also need to supply the full URL to the new destination. For example, http://www.example.com/uploads/newdestination/ It is a required setting.

Allowed File Types

This preference will determine how the system handles the uploaded files. You have two choices for this preference:

  1. Images only: With this preference set, the system will only allow image files of the type GIF, JPG, JPEG, or PNG.

  2. All file types: This option will allow you to upload files of any type to the system. Be careful with this setting since it could be possible for someone to upload a malicious file.

Maximum File Size (in bytes)

You can optionally set a maximum allowed size for uploaded file. Leave the setting blank if you do not wish to impose a limit. The size is defined in bytes; 1 kilobyte = 1024 bytes. Example: to limit each upload to 30 kilobytes, you'll put 30720 in the field.

Note: Servers usually also have built-in limits on the amount of data that can be uploaded via PHP at one time. The default value for this in PHP is 2 MB. If you have a need to upload very large files, then you should contact your Host or server admin and talk to them about any size limits they have in place.

Maximum Image Height (in pixels)

You can optionally set the maximum allowed height for uploaded images. Leave the setting blank if you do not with to impose a limit. The size is defined in pixels. This option only applies to uploaded images and not other file types.

Maximum Image Width

You can optionally set the maximum allowed width for uploaded images. Leave the setting blank if you do not with to impose a limit. The size is defined in pixels. This option only applies to uploaded images and not other file types.

Image Properties

These properties will be added inside the image tag (if an image is uploaded) or the hyperlink (if a non-image file is uploaded). Leave this setting blank if you do not wish for any properties to be added.

If you have border="0" alt="image" name="image" set and upload an image file, then the resulting tag might look like this:

<img src="http://www.example.com/uploads/newdestination/rose.jpg" border="0" alt="image" name="image" width="124" height="98" />

Pre Formatting

This setting lets you specify data to be placed before the HTML for the uploaded file. Using this (and the following) setting you can easily "wrap" your file code. For example, you could use <div class="thumb">.

Post Formatting

This setting lets you specify data to be placed after the HTML for the uploaded file. Using this (and the previous) setting you can easily "wrap" your file code. For example, you could use </div>. Together with the previous setting you would get this output:

<div class="thumb"><img src="http://www.example.com/uploads/newdestination/rose.jpg" border="0" alt="image" name="image" width="124" height="98" /></div>

Restrict file uploading to select member groups

This setting allows you to specify which member groups have permission to upload files to this file upload destination. By default, Guests, Members and any user-created member groups are listed. Super Admins can always upload files.

Edit

The Edit link in the main File Upload Preferences table allows you to edit the preferences for an existing upload destination.

Edit screen

Descriptive name of upload directory

This is the descriptive name of the upload destination. It is a required field and must be unique, but spaces are allowed. This is the name of the choice that will appear when uploading files.

Server Path to Upload Directory

This is the path to the upload directory for this destination. It is a required setting. It may either be the server path (/home/user/example.com/http_docs/uploads/newdestination) or a relative path from the perspective of the Control Panel (../uploads/newdestination/).

Important:
The directory you specify here is not created automatically (the system would need to have permissions on the server in order to create and set up the directory). Therefore, you will need to set up the directory yourself:

  1. Create the specified directory on the server. This is often done either through FTP or through a control panel on your web host.
  2. If you are on a Unix-based server, you must set the permissions of the new directory to 777. (For Windows-based servers you do not need to do this.)

URL of Upload Directory

You will also need to supply the full URL to the new destinations. For example, http://www.example.com/uploads/newdestination/ It is a required setting.

Allowed File Types

This preference will determine how the system handles the uploaded files. You have two choices for this preference:

  1. Images only: With this preference set, the system will only allow image files of the type GIF, JPG, JPEG, or PNG.

  2. All file types: This option will allow you to upload files of any type to the system. Be careful with this setting since it could be possible for someone to upload a malicious file.

Maximum File Size (in bytes)

You can optionally set a maximum allowed size for uploaded file. Leave the setting blank if you do not wish to impose a limit. The size is defined in bytes; 1 kilobyte = 1024 bytes. Example: to limit each upload to 30 kilobytes, you'll put 30720 in the field.

Maximum Image Height (in pixels)

You can optionally set the maximum allowed height for uploaded images. Leave the setting blank if you do not with to impose a limit. The size is defined in pixels. This option only applies to uploaded images and not other file types.

Maximum Image Width

You can optionally set the maximum allowed width for uploaded images. Leave the setting blank if you do not with to impose a limit. The size is defined in pixels. This option only applies to uploaded images and not other file types.

Image Properties

These properties will be added inside the image tag (if an image is uploaded) or the hyperlink (if a non-image file is uploaded). Leave this setting blank if you do not wish for any properties to be added.

If you have border="0" alt="image" name="image" set and upload an image file, then the resulting tag might look like this:

<img src="http://www.example.com/uploads/newdestination/rose.jpg" border="0" alt="image" name="image" width="124" height="98" />

Pre Formatting

This setting lets you specify data to be placed before the HTML for the uploaded file. Using this (and the following) setting you can easily "wrap" your file code. For example, you could use <div class="thumb">.

Post Formatting

This setting lets you specify data to be placed after the HTML for the uploaded file. Using this (and the previous) setting you can easily "wrap" your file code. For example, you could use </div>. Together with the previous setting you would get this output:

<div class="thumb"><img src="http://www.example.com/uploads/newdestination/rose.jpg" border="0" alt="image" name="image" width="124" height="98" /></div>

Restrict file uploading to select member groups

This setting allows you to specify which member groups have permission to upload files to this file upload destination. By default, Guests, Members and any user-created member groups are listed. Super Admins can always upload files.

Delete

The Delete link in the main File Upload Preferences table allows you to delete the upload destination. Upload destination deletion is permanent and irreversible, so be very careful before deleting a file upload destination. Note: Any existing files within the destination directory will not be deleted.

Delete screen

You will be prompted to confirm your decision before you can delete the upload destination.