kolyadin/sonata-media-chunk-uploader

A bundle which allows you to load large files by chunks in Sonata media.

Installs: 1 832

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Language:JavaScript

Type:symfony-bundle

dev-master 2020-08-17 21:17 UTC

This package is auto-updated.

Last update: 2024-10-18 06:43:21 UTC


README

Bundle allows you to upload large files from admin-panel by chunks, use custom form-type LargeMediaType and sonata media provider (fixed issue with memory) sonata.media.provider.large_file.

Installation

composer require kolyadin/sonata-media-chunk-uploader:*

Add routes:

chunk_uploader:
    resource: "@SonataMediaChunkUploaderBundle/Admin/Controller/"
    type:     annotation

Add custom widget to twig config:

twig:
    form_themes:
        - '@SonataMediaChunkUploader/Form/fields.html.twig'

Configuration (optional)

sonata_media_chunk_uploader:
  chunks:
    chunk_folder: "%kernel.root_dir%/../web/uploads/media/chunks" 
    chunk_size: 3000 # in bytes
    load_distribution: true
    maxage: 604800
  storage:
    type: 'filesystem'