vichuploaderbundle

Sonata Admin + Vich Upload inject on load not working

…衆ロ難τιáo~ 提交于 2019-12-11 11:25:34
问题 i am using vich upload with sonata admin & i can able to upload & delete file my issue is i am not able to get uploaded file information i used vich uploader config "inject_on_load" as true vich_uploader: db_driver: orm # or mongodb or propel or phpcr mappings: small_image: uri_prefix: /uploads/images/small upload_destination: %kernel.root_dir%/../web/uploads/images/small namer: vich_uploader.namer_uniqid inject_on_load: true delete_on_update: true delete_on_remove: true now when i dump my

Symfony VichUploaderBundle: File name could not be generated

六眼飞鱼酱① 提交于 2019-12-10 13:38:26
问题 I am using VichUploader to upload files within a symfony project. In configuration i use (copied from documentation): service: vich_uploader.namer_property options: { property: 'slug'} In my entity i generate the slugs automatically with Gedmo/Sluggable: /** * @Gedmo\Slug(fields={"title"}, updatable=false) * @ORM\Column(type="string", length=100, nullable=false) */ protected $slug; But when trying to save the entity i get the following error 500: File name could not be generated: property

How to configure VichUploader in entity mapped by yml?

十年热恋 提交于 2019-12-10 09:49:06
问题 I have a entity called 'Magazine', mapped from yml file: Acme\DemoBundle\Entity\Magazine: type: entity table: magazine id: id: type: integer generator: { strategy: AUTO } fields: edition: type: string length: 255 nullable: false title: type: text nullable: false cover: type: string length: 255 nullable: false file: mapping: magazine_cover filename_property: cover I made the configuration necessary in the app/config/config.yml: knp_gaufrette: stream_wrapper: ~ vich_uploader: db_driver: orm

VichUploaderBundle & Cropit - Pass base64 to a File instance

冷暖自知 提交于 2019-12-08 08:59:34
问题 First, since English is not my native tongue, please excuse my mistakes. I'm trying to develop my first project through Symfony2. However I got stuck with file uploads. So I've installed VichUploaderBundle which provide exactly what I need to manage: all kind of uploaded Media (mainly images). Why do I need to upload an image? I have user on my project, and they can edit their profile. So, I have an entity ProfilePicture which should manage the upload, thanks to VichUploaderBundle. It works

liip_imagine with vich_uploader not creating cache

江枫思渺然 提交于 2019-12-05 21:31:54
I am working on a Symfony project which consists of two inner projects. ONE project and MARKETPLACE project. Here is how the files strucure in the web. web/ ---one/ #this one is being called from subdomain one.domain.com ------/app_dev.php ---marketplace/ #this one is being called from the main domain domain.com ------/app_dev.php now i have a third folder ---/images i want to allow the user to upload images from the ONE and to be displayed in the MARKETPLACE here is my config apps/config/bundles/liip_imagine.yml # LiipImagineBundle liip_imagine: resolvers: default: web_path: web_root: %kernel

How to configure VichUploader in entity mapped by yml?

穿精又带淫゛_ 提交于 2019-12-05 19:15:38
I have a entity called 'Magazine', mapped from yml file: Acme\DemoBundle\Entity\Magazine: type: entity table: magazine id: id: type: integer generator: { strategy: AUTO } fields: edition: type: string length: 255 nullable: false title: type: text nullable: false cover: type: string length: 255 nullable: false file: mapping: magazine_cover filename_property: cover I made the configuration necessary in the app/config/config.yml: knp_gaufrette: stream_wrapper: ~ vich_uploader: db_driver: orm mappings: magazine_cover: uri_prefix: /upload/magazine/cover upload_destination: %kernel.root_dir%/../web

how to upload files to Google Cloud Storage with symfony / gauferette / VichUploaderBundle

霸气de小男生 提交于 2019-12-05 07:54:06
问题 Good morning, I am uploading my files locally through VichUploaderBundle. Every thing works perfectly. Now I want no more store my files locally: I want to store them on Google Cloud Storage . I found that KnpGaufretteBundle could be used for storing files in the cloud. So, is there any example or a example's link on how to configure Gaufrette (the php package) or KnpGaufretteBundle (the symfony bundle) for storing/uploading/reading files on google-cloud-storage ? The only thing I found is

Could not load type “file” in Symfony3

早过忘川 提交于 2019-11-28 11:34:33
问题 I am building form with multiple image upload and I can't find solution for problem that is mentioned in title. To help me with that I included VichUploaderBundle Right now I am stuck with this error and I can't find why and where is mistake in code: Could not load type "file" 500 Internal Server Error - InvalidArgumentException Does someone knows where is the problem? Here is code that I am using: ProductType class: <?php namespace AppBundle\Form\Type; use Symfony\Component\Form\AbstractType