0
我不知道爲什麼,但圖像預覽不能與我的奏鳴曲管理包一起工作。奏鳴曲媒體包,無法預覽圖像
有我的配置:
sonata_media:
db_driver: doctrine_orm # or doctrine_mongodb, doctrine_phpcr it is mandatory to choose one here
default_context: default # you need to set a context
contexts:
default: # the default context is mandatory
providers:
- sonata.media.provider.dailymotion
- sonata.media.provider.youtube
- sonata.media.provider.image
- sonata.media.provider.file
- sonata.media.provider.vimeo
formats:
small: { width: 100 , quality: 70}
big: { width: 500 , quality: 70}
cdn:
server:
path: "/uploads/media" # http://media.sonata-project.org/
filesystem:
local:
directory: "%kernel.root_dir%/../web/uploads/media"
create: true
providers:
image:
service: sonata.media.provider.image
resizer: sonata.media.resizer.simple # sonata.media.resizer.square
filesystem: sonata.media.filesystem.local
cdn: sonata.media.cdn.server
generator: sonata.media.generator.default
thumbnail: sonata.media.thumbnail.format
allowed_extensions: ['jpg', 'png', 'jpeg']
allowed_mime_types: ['image/pjpeg', 'image/jpeg', 'image/png', 'image/x-png']
,有我所得到的,當我要預覽
,但圖像以及上傳,所以我不明白爲什麼不顯示。
,我上傳的目錄:網絡/上傳/媒體