我已調升sonatamediabundlePNG文件無法上傳奏鳴曲媒體捆綁
我可以上傳JPG文件雖然正確,當我嘗試上傳PNG文件。
它顯示錯誤。
An error has occurred during the creation of item "n/a".
我的config.yml是這樣的。 我想我正確設置了png文件配置。 是否有任何其他檢查點上傳PNG?
sonata_media:
# if you don't use default namespace configuration
#class:
# media: MyVendor\MediaBundle\Entity\Media
# gallery: MyVendor\MediaBundle\Entity\Gallery
# gallery_has_media: MyVendor\MediaBundle\Entity\GalleryHasMedia
default_context: default
db_driver: doctrine_orm # or doctrine_mongodb, doctrine_phpcr
contexts:
default: # the default context is mandatory
providers:
- sonata.media.provider.dailymotion
- sonata.media.provider.youtube
- sonata.media.provider.image
- sonata.media.provider.file
formats:
small: { width: 100 , quality: 70}
big: { width: 500 , quality: 70}
cdn:
server:
path: /myapp/web/uploads/media # Its not good I need to change depending on server...
filesystem:
local:
directory: %kernel.root_dir%/../web/uploads/media
create: false
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']
從app/logs目錄中提供上述錯誤的日誌 –
上傳函數的外觀如何? –