Download the PHP package patroklo/octobercms-improved-fileupload without Composer

On this page you can find all versions of the php package patroklo/octobercms-improved-fileupload. 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 octobercms-improved-fileupload

OCTOBER CMS IMPROVED FILE UPLOAD FORM WIDGET

A simple extension for the October CMS's FileUpload form widget that lets the addition of user defined rules in the form YAML config files or the models where the field is declared.

Installation

Manually from your terminal typing:

Or add this to your project's composer.json file:

And it's done!

New image mode

There's a new mode in the form widget called image-multi-big. When activated, it will make bigger images when uploading them than the standar multiupload.

To activate this mode you only have to declare it in the yaml file:

New Rules

There are an additional set of rules developed to increase the performance of the form system:

maxFiles:[number]

This rule must only be used in this form widget.

It checks the number of uploaded files linked into this model and, if it's more than the defined number, will throw an error and stop the upload.

Configuration

 Add the form widget into your YAML config form files:

Since this is not a default form widget the better way to do this is declaring the class full namespace:

And now you can use the form widget as is it was the default version of FileUpload.

User defined rules

The rules are the very same that are used in the Validation library, with additional ones defined in the New Rules section.

If you want to use user defined upload rules, there are two different ways to accomplish this: add a YAML option in the form config file or a method into the method class.

The YAML config file will have priority over the model's method one, so if you have both defined at the same time, it will be applied the YAML one.

Adding the rules into the YAML config file:

Adding the rules into a model's method

You can add a new method into the model that holds the attribute where you can add your files that will store all it's rules.

This way of adding rules has the benefit of allowing dynamic rules.

And that's all folks! Any question or idea you have will be welcomed!


All versions of octobercms-improved-fileupload with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
october/rain Version ~1.0
october/system Version ~1.0
october/backend Version ~1.0
october/cms Version ~1.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 patroklo/octobercms-improved-fileupload contains the following files

Loading the files please wait ....