Download the PHP package royalcms/uploader without Composer

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

Royalcms Uploader

Uploading files and store its in Filesystem / Cloud storage in Royalcms is not easy and simple for some developers. This package provides a simple way to do that, and comes with fluent interface that you might like.

Configuration

The Uploader configuration is located at packages/royalcms/uploader/uploader.php, where you can adjust the default file provider and the default file visibility as you want.

File Providers

This package comes with two file providers, from HTTP request and local filesystem. Before uploading a file, you can set where the file is provided. Example:

If you call method on the RC_Uploader facade without first calling the from method, the uploader will assume that you want to use the default provider.

Usage

Uploading a File

Now, uploading a file is very simple like this:

The upload method accept a request key or path where the file is located (based on the file provider) as first parameter and returns a boolean: true if succeed or false if failed.

You may pass a Closure callback as second parameter that will be called if the file successfully uploaded:

Choosing the File Storage

Automatically, the Uploader will use your default [Filesystem] Disk when storing the file. But, you can choose where you will store the file with uploadTo method:

Set the Folder

Maybe you want to specify the folder where the file will be stored. Just use the toFolder method:

Rename the File

Adjust the filename as you want with renameTo method:

If you ignore this method, the file will be renamed to random and unique name.

File Visibility

You may set the [Filesystem] using the setVisibility method:

Or just ignore this, and the Uploader will set the visibility based on your configuration.

Method Chainning

All the methods above except the upload method, are chainable. Feel free to call other methods before calling the upload. Example:


All versions of uploader with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.9
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 royalcms/uploader contains the following files

Loading the files please wait ....