File/classes/UploadImage.class.php

Description
Classes
Class Description
 class UploadImage FileUploader is a class that allows for easy implementation for uploading multiple image or audio files at once.
Includes
 require ('ImageUploader.class.php') (line 44)

UploadImage will create an object that will allow for easy implementation of uploading an image

This image uploader will allow for multiple images to be uploaded at once The uploader will also make two copies of the image (small, thumb) that will be uploaded to their respective folder within the same parent folder as the original image

IMPORTANT

  • The <input> name must be an array even if there is one <input>
  • ex. <input type='file' name='image[]'/>
  • You must set the originalFilePath unless 'images/full/' is your working
directory
  • the small & thumbnail directories will be set in accordance to your
full directory
  • ex.
<?php $imageUploader = new ImageUploader(); $imageUploader->setOriginalFilePath('images/uploaded/full'); ?>

after the uploadImage() function is called, the small and thumbnail directories variables will be automatically set to... 'images/uploaded/small' && 'images/uploaded/thumb'

  • The default maxUploadSize of an image is 5MB
  • You may set a custom prependToFileName by calling the
setPrependToFileName() function.
  • This will take whatever you set it to and prepend it to the filename
so you can better organize your photos
  • If you are uploading more than one image then you can set the number of
uploading images by calling numberOfAllowedImagesToUpload();
  • It is also possible to set the smallImage and the thumbImage desired height
and width using setSmallImageWidthAndHeight() and setThumbImageWidthAndHeight() respectively
  • It's important to note that this script will ignore either the desired
height or width in order to maintain aspect ratio
  • You may set the number of files allowed per directory (default: 100)

  • author: Michael Dahlke

Documentation generated on Wed, 28 Aug 2013 22:54:22 -0500 by phpDocumentor 1.4.4