modera / file-uploader-bundle
Installs: 4 019
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 6
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.6
- modera/file-repository-bundle: ~3.1|~4.0
- modera/foundation-bundle: ~3.1|~4.0
- sergeil/expander-bundle: ^1.0
Requires (Dev)
- phake/phake: ^2.0
- phpunit/phpunit: ^5.5
- sergeil/aux-bundle: ^1.0
- dev-master / 4.x-dev
- 3.x-dev
- v3.1.0
- v3.0.0
- 2.x-dev
- v2.57.0
- v2.56.0
- v2.55.0
- v2.54.0
- v2.53.0
- v2.52.2
- v2.52.1
- v2.52.0
- v2.51.1
- v2.51.0
- v2.0.50
- dev-sf3
- dev-MPFE-1014
- dev-MPFE-1014-2
- dev-MPFE-1017
- dev-MPFE-1029
- dev-crub_pagination_fetch_fix
- dev-direct-bundle-csrf
- dev-MPFE-1005
- dev-MPFE-1007
- dev-MPFE-963
- dev-MPFE-975
- dev-MPFE-977
This package is auto-updated.
Last update: 2024-11-29 04:19:52 UTC
README
The bundle simplifies and introduces a consistent approach to uploading and storing uploaded files.
Installation
Step 1: Download the Bundle
composer require modera/file-uploader-bundle:4.x-dev
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Step 2: Enable the Bundle
This bundle should be automatically enabled by Flex.
In case you don't use Flex, you'll need to manually enable the bundle by
adding the following line in the config/bundles.php
file of your project:
<?php // config/bundles.php return [ // ... Modera\FileRepositoryBundle\ModeraFileRepositoryBundle::class => ['all' => true], // if you still don't have it Modera\FileUploaderBundle\ModeraFileUploaderBundle::class => ['all' => true], ];
Step 3: Add routing
// config/routes.yaml file_uploader: resource: "@ModeraFileUploaderBundle/Resources/config/routing.yml"
Step 4: Enable uploader
// config/packages/modera.yaml modera_file_uploader: is_enabled: true
Documentation
Before you can upload files you need to create a repository that will host them, for instructions please see ModeraFileRepositoryBundle.
Once you have a repository configured, from web you can send request with files to uploader gateway URL ( configured by
modera_file_uploader/url configuration property, default value is uploader-gateway
) and it will upload them and
put to a configured repository. For example, javascript pseudo code:
filesForm.submit({ url: 'uploader-gateway', params: { _repository: 'my_files' } });
Request parameter _repository
will be used to determine what repository to use to store uploaded files. By default
all repositories are exposed to web and files can be uploaded to them, this feature is controller by expose_all_repositories
configuration property.
Licensing
This bundle is under the MIT license. See the complete license in the bundle: Resources/meta/LICENSE