Download the PHP package almazik/laravel-uploader without Composer

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

Laravel Uploader.

If you're anything like me, you probably find yourself facing that you need to tacke file uploading from app to app, and you just manually wright things over and over again. Should this be repetitive? No.

Instead, delegate this job to package which has only responsibility - uploading files.

Install

Pull this package in through Composer.

Then you'll need to reference the Service Provider Class. Insert this line into your config/app.php file, just append to providers array.

For your convinience, you might also want to reference the facade.

Usage

Let's assume we have a form for uploading a file, and controller's method to handle when it posts to it.

Here's an example.

If you don't want to use facade, use dependency injection:

You can chain methods.

Input Sources

Currently package supports 2 input types: files uploaded through the form (as described above) and base64_encoded version of the file.

Imaging that you integrating some kind of third party api that would send you files in base64_encoded format. Easy enough:

Just notice that in this case you'll likely want to explicitly tell the filename to use as the package itself will try to lookup the given file mime-type and associate it with extension, but this doesn't work 100% of the times as not every mime-type has a fixed extension.

Destination

The package uses Laravel's filesystem, so it has built in support for all drivers as Laravel does: local, s3, ftp, rackspace.

Be sure to check configs in config/filesystem.php to set up the path where your files will be uploaded.

For example, let's assume in your config/filesystem.php your default driver set to s3.

With these settings along, your file will be uploaded to your bucket being as the root and path that was passed in as an argument to push method.

FileNames

By default, file will be uploaded with the original file name, being prefixed with the current timestamps and all whitespaces being replaced with underscores. If you want to override this, you can do this before calling the push method

Persisting

After uploading a file, you'll probably want to save the path to the DB, right? No probs, after uploading the file, just get the full path like this


All versions of laravel-uploader with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.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 almazik/laravel-uploader contains the following files

Loading the files please wait ....