Uploads

The upload directory dictates where uploaded files will be stored, and the path is relative to the site root. A file living at www.example.com/files/uploads/ would have an upload directory of files/uploads/. The trailing slash is necessary here to determine a directory; otherwise, BigTree would append the last part of the path to the filename.

The full path to the upload is stored in the database; files can be linked to directly or included in your site by echoing the upload field.

Images

Image Upload Dialog

If you're uploading images, BigTree offers a few extra file management and image adjustment capabilities.

Minimum Width & Height will prevent users from uploading images that do not meet minimum resolution requirements.

Preview Prefix determines which version of the image will be displayed to BigTree users.

Crops & Thumbnails provide fine-grain control of image dimensions. Setting a crop will allow you to select the exact area of an image to use and resize the selected area for optimum use in your site.

Thumbnails will resize the image to within the given dimensions, maintaining the original aspect ratio.

Prefixes allow BigTree to store multiple versions of an image. By default, if no prefix is selected, BigTree will only save a modified version of the image. This conserves storage space and bandwidth.

If you state a prefix, however, BigTree will save a version of the image with that prefix attached. For example, if image.jpg is uploaded, thumbnail_image.jpg could be used as a preview on your site, linking to the original image in a lightbox.

Accessing Prefixed Images

BigTree saves images as file paths in the database, therefore simply appending the prefix to the beginning of the database entry will not link to the modified image. To avoid this problem, and provide access to prefixed files, use the BigTree::prefixFile() function:

echo $image; // http://www.example.com/image.jpg 
echo BigTree::prefixFile($image, "prefix_"); // http://www.example.com/prefix_image.jpg