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.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
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
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package eeshiro/file-upload contains the following files

Loading the files please wait ....