$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);
}
-
Notifications
You must be signed in to change notification settings - Fork 0
Ndione24/UploadFileHelper
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published