-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't get it to work SF4 #62
Comments
@anitaeisenhaber sorry for the delay. Thanks for the detailed information.
<?php
//App\Application\Sonata\MediaBundle\Provider\ImageProvider.php
namespace App\Application\Sonata\MediaBundle\Provider;
use SilasJoisten\Sonata\MultiUploadBundle\Traits\MultiUploadTrait;
use Sonata\MediaBundle\Provider\ImageProvider as BaseImageProvider;
class ImageProvider extends BaseImageProvider
{
use MultiUploadTrait;
} Your yaml should look like: parameters:
sonata.media.provider.image.class: App\Application\Sonata\MediaBundle\Provider\ImageProvider
services:
sonata.media.provider.image:
class: "%sonata.media.provider.image.class%"
arguments:
- "sonata.media.provider.image"
- "@sonata.media.filesystem.local"
- "@sonata.media.cdn.server"
- "@sonata.media.generator.default"
- "@sonata.media.thumbnail.format"
- ['jpg', 'png', 'jpeg', 'gif']
- ['image/pjpeg', 'image/jpeg', 'image/png', 'image/x-png', 'image/gif']
- "@sonata.media.adapter.image.default"
- "@sonata.media.metadata.proxy"
calls:
- [ setTemplates, [ { helper_thumbnail: "Media/Provider/thumbnail.html.twig", helper_view: "Media/Provider/view_image.html.twig"} ] ]
tags:
- { name: sonata.media.provider, multi_upload: true }
public: true This is almost the same like yours with a few small differences regarding the classname. This bundle does not provide a form type. It only hooks into the What you could do is generate an url to the multiupload action. |
Hello,
I am trying to get this to work but am a little bit stuck.
The upload is still the same and I feel like I am doing something really basic wrong or missing something. How do I get my form to display the multiupload instead of normal upload?
The text was updated successfully, but these errors were encountered: