Skip to content

Ndione24/UploadFileHelper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

UploadFileHelper

Usage example :

$uploadObject = new UtilFileUpload($_FILES['file']);

$uploadObject
    ->generateName()
    ->moveTo("/public/resource_folder/")
    ->acceptedExtensions(["png", "jpg", "jpeg", "pdf"])
    ->sizeLimit(10000000000)
    ->process();
    
 // If error : 
 if (count($uploadObject->getError()) > 0) {
    echo json_encode(array('success' => false, "message" => $uploadObject->getError()), JSON_PRETTY_PRINT);
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages