Skip to content

Matheus2212/php-upload-class

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

php-upload-class

Upload class for huge files. It was tested with a 35gb file. NOT OPTIMIZED IN FRONTEND.

NOTE: This class and README are being redone. Please, wait for more detailed information.


How to use

  • Add profile: Set the Upload 'profile', for validation during upload proccess:
include('class/path/file.php');

$profile = array(
        "types" => array("jpeg", "jpg", "png"), // which filetypes are accepted
        "folder" => "./uploads/", // which folder your files go, for this specific profile, on your local server
        "size" => 266000, // max size of file upload
        "total" => 10, // total files that can be upload on this input
        "vars" => array(), // additional vars that will be passed to frontend and backend
);

Upload::addProfile('image', $profile);

After that, bind the input name to the profile:

Upload::addInput('image', 'image'); // inputName, uploadProfileName


  • Init: After preparation, on your page's footer or end of the route, call:
Upload::init() ;

About

PHP Backend class for my own JS upload handle

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages