Download the PHP package eeshiro/file-upload without Composer
On this page you can find all versions of the php package eeshiro/file-upload. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download eeshiro/file-upload
More information about eeshiro/file-upload
Files in eeshiro/file-upload
Download eeshiro/file-upload
More information about eeshiro/file-upload
Files in eeshiro/file-upload
Vendor eeshiro
Package file-upload
Short Description Handles http file upload request from form data
License MIT
Homepage https://github.com/eeshiro/file-upload
Package file-upload
Short Description Handles http file upload request from form data
License MIT
Homepage https://github.com/eeshiro/file-upload
Keywords decimal-to-wordmoney-words
Please rate this library. Is it a good library?
Informations about the package file-upload
FileUpload
Simple File uploading library capable of handling multiple file uploads
Installing Add file to Composer.json file:
or
composer require eeshiro/file-upload
Usage
Rules and Methods Reference
Rule | Parameter | Description | Example |
---|---|---|---|
require | No | Returns FALSE if the form element is empty. | |
single | No | Returns FALSE if file upload type multiple. | |
multiple | No | Returns FALSE if file upload type single. | |
max_file | Yes | Returns FALSE if file count is greater than maximum number of files specified. | max_file(5) |
min_file | Yes | Returns FALSE if file count is less than minimum number of files specified. | min_file(2) |
image | No | Returns FALSE if uploaded file is not an image. | |
exist | Yes | Returns FALSE if file already exist on the directory. | exist(directory) |
min_size | Yes | Returns FALSE file size is under the minimum size specified. Parameter 1 : size (Integer). Parameter 2 : size Type (String) Available size type (KB, MB, GB, TB) | min_size(2, 'MB') |
max_size | Yes | Returns FALSE if file exceeds the maximum size specified. Parameter 1 : size (Integer). Parameter 2 : size Type (String) Available size type (KB, MB, GB, TB) | min_size(2, 'MB') |
valid_format | Yes | Returns FALSE if file format is not in the list specified. Parameter 1 : file type list (Array) | valid_format(['jpg', 'png', 'gif']) |
move | Yes | Moves the validated file to the directory specified. Returns TRUE if successfully saved, FALSE if not. Parameter 1 : directory (String). Parameter 2 : use original filename (Boolean) (true if retain, false if not). | move('directory/filename.txt', false) |
get | No | Returns the file validated. | |
has_error | Yes | Returns TRUE if validation has error. Parameter 1: file index / file field name (String). NOT REQUIRED. | |
error_count | Yes | Returns NUMBER of errors on validation. Parameter 1: file index / file field name (String). NOT REQUIRED. | |
get_errors | Yes | Return validation errors. Parameter 1: glue (String) (If NULL returns array of errors). Parameter 1: file index / file field name (String) (NOT required). | get_errors(' ') |
move_uploaded_file | Yes | Moves the file to the directory specified. Parameter 1 : File from get method (Array). Parameter 2 : File directory. | move_uploaded_file($file, 'directory/'.$file['name']) |
All versions of file-upload with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.6.0
The package eeshiro/file-upload contains the following files
Loading the files please wait ....