PHP Classes

PHP AJAX Upload file: Process image files uploaded via AJAX

Recommend this page to a friend!
  Info   Example   Screenshots   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 53%Total: 1,263 All time: 3,037 This week: 45Up
Version License PHP version Categories
ajax-upload 1.0.15GNU General Publi...5HTTP, PHP 5, Files and Folders, AJAX
Description 

Author

This class can process image files uploaded via AJAX.

It takes a form submission request to upload a file via AJAX and returns messages to the browser to communicate the result of the file processing.

The class returns error messages in case no file was uploaded, or the file name extension is not in the list of accepted extensions, or the file size was exceeded the allowed limit, or the file already exists in the destination directory.

If the file upload is valid, the class moves it to the destination directory and returns a HTML message to display the uploaded image file in the browser.

Picture of Ravi Kumar
  Performance   Level  
Innovation award
Innovation award
Nominee: 2x

 

Recommendations

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

Example

<?php
   
include_once 'upload.php';

   
$image = new Upload(
        array(
           
'file' => 'image'
       
)
    );

    echo
$image->process();


Details

Build Status Scrutinizer Code Quality Code Coverage Build Status Dependency Status AjaxUpload

This class can process image files uploaded via AJAX.

It takes a form submission request to upload a file via AJAX and returns messages to the browser to communicate the result of the file processing.

The class returns error messages in case no file was uploaded, or the file name extension is not in the list of accepted extensions, or the file size was exceeded the allowed limit, or the file already exists in the destination directory.

If the file upload is valid, the class moves it to the destination directory and returns a HTML message to display the uploaded image file in the browser.


Screenshots (1)  
  • Screenshot.png
  Files folder image Files (11)  
File Role Description
Files folder imageassets (3 directories)
Accessible without login Plain text file .travis.yml Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file image.php Example Example script
Accessible without login Plain text file index.html Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation
Plain text file upload.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 90%
Total:1,263
This week:0
All time:3,037
This week:45Up
 User Ratings  
 
 All time
Utility:75%StarStarStarStar
Consistency:75%StarStarStarStar
Documentation:-
Examples:80%StarStarStarStarStar
Tests:-
Videos:-
Overall:53%StarStarStar
Rank:2308