Questions tagged [sonata-media-bundle]

SonataMediaBundle is a main bundle of Sonata admin which handles all media providers like youtube,vimeo,dailymotion,files(all file types) and provides a structure to build custom media provider.The SonataMediaBundle is a media library based on a dedicated provider which handles different type of media: files, videos or images.

Each sonata media type is managed by a provider service which is in charge of:

  • retrieving media metadata
  • generating media thumbnail
  • tweaking the edit form
  • rendering the media

Each media can be linked to a context. A context can be news, user or any name you want. A context allows you to group a set of pictures together. As requirements can be different for each context, a context is defined by a set of formats and a set of providers.

As the infrastructure is not standard, the MediaBundle abstracts the filesystem layer and the cdn layer. Visit : https://sonata-project.org/bundles/media/3-x/doc/index.html for full documentation

195 questions
4
votes
0 answers

Sonata Admin Bundle: Paginate one-to-many field using sonata_type_collection

I am using SonataAdminBundle to display one-to-many fields of an entity on the admin panel. Since I have a lot of related entities I am getting a 503 error when displaying the admin form. I can override the template to limit the number of children…
4
votes
4 answers

How to remove a Symfony service? (Sonata Classification)

I'm using SonataAdminBundle with MediaBundle that has a dependency on ClassificationBundle. By default, ClassificationBundle adds in backend admin management for categories, tags, collections and contexts, but since my application doesn't use them I…
George Irimiciuc
  • 4,573
  • 8
  • 44
  • 88
4
votes
1 answer

Sonata media Liip Imagine Integration

I am trying use Liip Imagine for generate thumbnails with Sonata Media following integration instructions: http://sonata-project.org/bundles/media/master/doc/reference/extra.html#liip-imagine-bundle-integration But I can't get correct path for the…
Ravz
  • 133
  • 1
  • 1
  • 6
4
votes
2 answers

ManagerInterface not found with SonataMediaBundle

I tried to install SonataMediaBundle as described here. After installation I'm getting this error: PHP Fatal error: Interface 'Sonata\CoreBundle\Model\ManagerInterface' not found in…
Ariyan
  • 14,760
  • 31
  • 112
  • 175
4
votes
2 answers

Symfony2 Sonata Media Bundle -- Error while uploading Image

I updated the composer.json. Everything was working fine except the media section of sonata media bundle. When i upload any image i got a error I haven't changed any configuration. I am not able to figure the problem. I also give full permission to…
4
votes
2 answers

No thumbnails generated

I am using Sonata Media Bundle with Symfony2.3 in my project. When I override youtube provider sonata.media.provider.youtube. Everything working fine. No errors or anything but in /Web/uploads/media no thumbnails generated but in my admin…
3
votes
1 answer

Preview column disappears when modifying Sonata Media Bundle

I am modifying the Sonata Media Bundle's media admin screen to show a new field. After using the Easy Extends tool to extend the bundle, I create a very small class to do this with: namespace App\Application\Sonata\MediaBundle\Admin\ORM; use…
3
votes
1 answer

Error trying to extend SonataMediaBundle "Impossible to invoke a method ("id") on a null variable"

I'm trying to extend the media class of SonataMediaBundle. I want to generate my own media to add more relations and properties. But now I am stuck with this error: Impossible to invoke a method ("id") on a null variable in …
3
votes
0 answers

How to edit the {{ block('form_widget') }}

I would like to edit the Form of media by SonataMediaBundle here 'widget_label_binary_content' widget_label_unlink. I found out this form is created via Resources/Form/media_Widgets.html.twig So, I overrided this twig…
whitebear
  • 11,200
  • 24
  • 114
  • 237
3
votes
0 answers

Send file with Postman to FosRestBundle Symfony

Im trying to upload file to a Symfony app, then retrieve the file from the ParamFetcher of FosRestBundle, finally create a SonataMedia object with the uploaded file. Im stuck on how to upload the file. The entire application has been developed using…
3
votes
2 answers

There is no main category related to context: default

I want to add a profile picture to my admin class, but i got this error : There is no main category related to context: default I searched a lot but no solution. this is my code config.yml # app/config/config.yml sonata_media: class: …
user6830821
3
votes
2 answers

Sonata media bundle - get pdf file by name or change filename on update

I currently use SonataAdminBundle and SonataMediaBundle. I have a problem with the media bundle files because my pdf file is not saved with its name but with md5 or another format. For example: media table id : 1 name :…
philou13010
  • 69
  • 1
  • 8
3
votes
1 answer

Symfony CMF Media Bundle invalidate image; the front doesn't reload the cached image

My problem is the following: When I change an image in the Symfony CMF admin, it changes in the admin (the image changes in the admin side, everything good); but in the front side I don't see the change. I see the old image, and it only refresh if I…
Marco Antonio
  • 339
  • 2
  • 10
3
votes
2 answers

Public and private Media of SonataMediaBundle uploaded in different folders (web and private)

I'm using SonataMediaBundle and until now I've been uploading files publicly in the web folder of Symfony. Here is part of my configuration file: contexts: default: # the default context is mandatory providers: -…
George Irimiciuc
  • 4,573
  • 8
  • 44
  • 88
3
votes
2 answers

how to rename file upload with sonata bundle

How to rename file i download with sonata-bundle ? the file is PDF and the name in database folder is : /upload/media/default/0001/01/0000000013ac6bf9000000017c7d6398.pdf I want my file appears like this : /upload/media/0001/01/myfile.pdf thank you…
1
2
3
12 13