Download the PHP package makinacorpus/filechunk-bundle without Composer

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

File upload widget and file management for Symfony

This bundle provides a chunked file upload endpoint, that is tailored to be used with the https://github.com/makinacorpus/filechunk-front widget, but that may be used by any other component,

The chunked file upload endpoint allows:

Known browsers to work with the external JavaScript widget:

Setup

Installation

Current version does not carry the associated JavaScript widget, you must install it from: https://github.com/makinacorpus/filechunk-front

Optionnally, if you are working in a Drupal 7 context, you may just install the following module: https://github.com/makinacorpus/drupal-filechunk instead of manually registering the JavaScript widget.

Basic configuration

Everything should be auto-configured if you follow the rest of this section.

Custom schemes configuration

Each custom scheme is tied to a custom folder, allowing you to store protocol relative URI in your database instead of absolute path, making the application portable and migrable easily.

Per default, the bundle offers three schemes:

Only the temporary one cannot be configured, all others can be set via the following .env file variables:

Chunked file upload widget configuration

Register the routing.yml file in your config/routes.yaml file:

And the associated form theme in your config/packages/twig.yaml file:

And it should probably work.

Usage

File manager API

Documentation will come soon.

File widget

Basic usage

Just use the MakinaCorpus\FilechunkBundle\Form\Type\FilechunkType form type in your own form builders.

Default values MUST be Symfony\Component\HttpFoundation\File\File instances, values returned will also be.

Validation

You may happily use the Symfony\Component\Validator\Constraints\File file constraint to validate you file:

Caveat with multiple values

When using the multiple property set to true, you cannot just apply the Assert\File validator, if you do, since the widget will return an array of files the validator will fail. To get around this problem, here is a real life working example on how to tranform the previous example:

You may find a better explaination of this there http://blog.arithm.com/2014/11/24/validating-multiple-files-in-symfony-2-5/

Using validation group when working with multiple values

Same as upper, but you have validation groups too, you need to cascade the groups in the whole validator chain, this way:

Important notes

That's pretty much it, have fun!


All versions of filechunk-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
symfony/dependency-injection Version ^5.4|^6.0
symfony/event-dispatcher Version ^5.4|^6.0
symfony/framework-bundle Version ^5.4|^6.0
symfony/finder Version ^5.4|^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 makinacorpus/filechunk-bundle contains the following files

Loading the files please wait ....