https://github.com/limit-zero/assetsbundle
Implements image upload support for projects utilizing limit0/asset
https://github.com/limit-zero/assetsbundle
image-processing symfony-bundle upload
Last synced: about 2 months ago
JSON representation
Implements image upload support for projects utilizing limit0/asset
- Host: GitHub
- URL: https://github.com/limit-zero/assetsbundle
- Owner: limit-zero
- License: mit
- Created: 2017-03-07T17:56:59.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-07T18:05:19.000Z (over 9 years ago)
- Last Synced: 2025-07-04T01:02:57.480Z (12 months ago)
- Topics: image-processing, symfony-bundle, upload
- Language: PHP
- Size: 6.84 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Limit0AssetsBundle
Implements image upload support for projects utilizing [limit0/assets](https://github.com/limit-zero/assets)
## Requirements
- You need an AWS account with access to an S3 bucket, or
- You need write access via your web server user to a path for local storage.
## Installation
Install the package via composer:
```
composer require limit0/assets-bundle
```
Include the bundle in your `AppKernel.php`:
```php
public function registerBundles()
{
$bundles = [
// ...
new Limit0\AssetsBundle\Limit0AssetsBundle(),
// ...
```
## Configuration
Configure the bundle using your preferred asset storage provider. Full possible configuration is listed below:
```yml
limit0_assets:
engine: aws_s3 # Either `aws_s3` or `local_storage`
http_prefix: //my-cdn.io/path-to-images/ # A URL prefix for your uploaded images. Can be relative.
# The URL provided by the uploader will prefix the filename with this path, so they can be viewed.
aws_s3:
region: us-east-1 # Default S3 storage region
acl: public-read # Default ACL for uploaded files
bucket: mybucket # Bucket to upload files to
local_storage:
path: /uploads/myproject # Path on server to upload files to. Can be relative.
```
If using AWS S3, `bucket` is required. If using local storage, `path` is required.
### Routing
You will need to import this bundle's routing. To prevent any potential collision issues, be sure to load it any other application routes:
```yml
limit0_assets:
resource: "@Limit0AssetsBundle/Resources/config/routing.yml"
prefix: /
app_bundle:
resource: "@AppBundle/Resources/config/routing.yml"
# ...
```