PHP Classes

PHP Multi File Uploader: Validate and process one or more file uploads

Recommend this page to a friend!
  Info   View files Example   View files View files (7)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 404 All time: 6,526 This week: 488Up
Version License PHP version Categories
multi-file-uploader 1.1GNU General Publi...5HTTP, PHP 5, Files and Folders, Valid...


This class can validate and process one or more file uploads.

There is one class that can validate and process individual file uploads. It checks if the file name extension and MIME type is one of the allowed, as well if the file size is below the allowed size limit.

The class can create the destination directory if it does not exists and move the uploaded file to that directory.

Another class calls the first to validate and process multiple files being uploaded.

  Performance   Level  
Classes: 1 package by
Country: Egypt Egypt
Age: 29
All time rank: 353240 in Egypt Egypt
Week rank: 307 Up8 in Egypt Egypt Up


Upload any type of files
Check all the files based on the content

PHP code to identify uploaded file format
I need a code to identify the file format of uploaded file

What is the best PHP AJAX file upload class?
I want to upload files using AJAX

Upload images using AJAX
Trying to upload avatar file

Large file upload handler
Looking for class that will handle large file uploads

upload .txt file
I need code for upload .txt file

Upload multiple images path
I need to upload multiple images from one file tag in HTML

upload multiple files
I need script for upload multiple files and images


<form action="example_for_multi_files_upload.php" method="post"
    <input type="file" name="images[]" multiple /> <input type="submit"
        name="submit" />
require_once 'classes/MultiFileUploader.class.php';

if (isset (
$_POST ['submit'] )) {
// var_dump($_FILES['images']);
if (isset ( $_FILES ['images'] )) {
$files_data = $_FILES ['images'];
$uploading_directory = 'uploads/multi'; // uploading directory
         * for example if your upload images
         * @var $files_types
$files_types = array (
         * for example exts types of the images
         * @var $files_exts
$files_exts = array (
// new object of the MultiFileUploader class
$up = new MultiFileUploader ( $files_data, $uploading_directory, $files_types, $files_exts );
$up->start_upload (); // init files data
         * MultiFileUploader::finish_upload ()
         * upload the files with check every validation
         * then @return an array with to index
         * 1st index "uploaded": the names of the uploaded files
         * 2nd index "errors" : array of errors of Invalid files validation
var_dump ( $up->finish_upload () );




Multi Files uploader is two classes to upload file or more with on input file html, with validation of the file type, size and extention;then move uploaded files.

# note

this repository contain two class:

1st uploader{} in upload.class.php file
  #the real owner is The software engineer "Ahmed Syam"
  @contact him
  # this class you can use it to upload on single file 

2nd is mine MultiFileUploader{} in MultiFileUploader.class.php
  # this one uses the 1st to upload multi file
  # Moustafa Mohammed Elgammal
  @contact me

  Files folder image Files  
File Role Description
Files folder imageclasses (2 files)
Files folder imageuploads (1 file)
Accessible without login Plain text file example_for_multi_files_upload.php Example multi files exampe
Accessible without login Plain text file example_for_single_file_upload.php Example single dile example
Accessible without login Plain text file LICENSE Lic. GNU license
Accessible without login Plain text file README.MD Doc. read me file

  Files folder image Files  /  classes  
File Role Description
  Plain text file MultiFileUploader.class.php Class multi files uploader class
  Plain text file upload.class.php Class the main single file upload

  Files folder image Files  /  uploads  
File Role Description
  Accessible without login Plain text file uploads Data uploads dir

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:6,526
This week:488Up