Download the PHP package joshmvc/filehandler without Composer

On this page you can find all versions of the php package joshmvc/filehandler. 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 filehandler

PHP Library: FileHandler

FileHandler is a php library that helps simplify the process of file processing (upload). It works well with single and multiple file(s) upload.

Installation

Recommended Method: Use Composer to get the library by running the script below

Other Installation Methods:

Download zip and extract to your directory

github download

OR clone from github directly to your library directory.

Clone using SSH:

[email protected]:/FileHandler.git

Clone using HTTPS:

https://github.com//FileHandler.git

Usage Requirement(s)

If manually installed, add this line of code to your autoloader or to the file you want to use FileHandler in:

If installed using composer, add this line of code to the file you want to use FileHandler in:

Inside the php file you want to use this library, import the namespace using the following code:

New Method(s)

upload_image($files, $destination, $file_name="", $max_size=0)

This method can be used to upload many format of image(s).

Accepted image format include jpeg, jpg, jpe, png, gif, bmp, svg, cod, ief, jfif, tif, tiff, ras, cmx, ico, pnm, pbm, ppm, rgb, xbm, xwd

Both $file_name and $max_size are optional. However, if you wish to specify final name of file, insert your parameter in the third args space and if you wish to specify file size please do so by inserting the size limit as bytes in the fourth args space (e.g. 2MB is 210241024 bytes so you will input 2097152).

Example Usage:

upload_video($files, $destination, $file_name="", $max_size=0)

This method can be used to upload many format of video(s).

Accepted video format include mp2, mp4, avi, mov, mpa, mpe, mpeg, mpg, mpv2, qt, lsf, lsx, asf, asr, asx, movie

Both $file_name and $max_size are optional. However, if you wish to specify final name of file, insert your parameter in the third args space and if you wish to specify file size please do so by inserting the size limit as bytes in the fourth args space (e.g. 2MB is 210241024 bytes so you will input 2097152).

Example Usage:

upload_audio($files, $destination, $file_name="", $max_size=0)

This method can be used to upload many format of audio(s).

Accepted audio format include au, snd, mid, rmi, mp3, aif, aifc, aiff, m3u, ra, ram, wav

Both $file_name and $max_size are optional. However, if you wish to specify final name of file, insert your parameter in the third args space and if you wish to specify file size please do so by inserting the size limit as bytes in the fourth args space (e.g. 2MB is 210241024 bytes so you will input 2097152).

Example Usage:

upload_document($files, $destination, $file_name="", $max_size=0)

This method can be used to upload many document format.

Accepted document format include txt, doc, docx, xls, xlsx, ppt, pptx, rtf, pdf and Latex files

Both $file_name and $max_size are optional. However, if you wish to specify final name of file, insert your parameter in the third args space and if you wish to specify file size please do so by inserting the size limit as bytes in the fourth args space (e.g. 2MB is 210241024 bytes so you will input 2097152).

Example Usage:

upload_compressed($files, $destination, $file_name="", $max_size=0)

This method can be used to upload many compressed files types.

Accepted compressed file format include zip, rar, gz, z, gtar, tgz

Both $file_name and $max_size are optional. However, if you wish to specify final name of file, insert your parameter in the third args space and if you wish to specify file size please do so by inserting the size limit as bytes in the fourth args space (e.g. 2MB is 210241024 bytes so you will input 2097152).

Example Usage:

Legacy Method(s)

__upload($files, $destination, $constraints=[])

__upload method takes in three arguments.

1) $files (required) - this contains the file element comming straight from $_FILES["input_name"] in html tag <input type="file" name="input_name[]" multiple>

2) $destination (required) - this is the path to the folder where the file is saved. [NOTE: this should not be url link.] example: "../images/dp/" or "../images/dp"

3) $constraints (optional) - this is the constraints required for file to be uploaded based on your requirements. This is an associative array in which any key - value pair can be ignored. constraint keys:

Use Case

You want users to be able to upload multiple files to your server. Below are the upload rules

files_upload.html

upload.php

FAQ

Why am I getting response "File upload failed?"

If this message persist, you might have exceeded the upload size limit of your php.ini file. You need to increase it or insert the code below to your HTACCESS file.

Or go to the following line in php.ini file and edit to suit your need.

Contributing

If you're interested in contributing to this project, you can check out the issues to know what is being requested by the users of this project.

However, if you're bringing on a new idea, you can mail me at [email protected] to discuss it with me. Thanks


All versions of filehandler with dependencies

PHP Build Version
Package Version
No informations.
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 joshmvc/filehandler contains the following files

Loading the files please wait ....