Questions tagged [vichuploaderbundle]

A simple Symfony2 bundle to ease file uploads with ORM entities, MongoDB ODM documents, PHPCR ODM documents or Propel models.

The VichUploaderBundle is a bundle that attempts to ease file uploads that are attached to ORM entities, MongoDB ODM documents, PHPCR ODM documents or Propel models.

  • Automatically name and save a file to a configured directory
  • Inject the file back into the entity or document when it is loaded from the datastore as an instance of Symfony\Component\HttpFoundation\File\File
  • Delete the file from the file system upon removal of the entity or document from the datastore
  • Templating helpers to generate public URLs to the file

All of this functionality is fully configurable to allow for app-specific customization

If your question matches problems described in the bulletlist below then use this tag.

Project page

253 questions
1
vote
1 answer

How to define mappings with OneToMany relation | VichUploaderBundle

Is it possible to define mapping on OneToMany Or OneToOne relation within parent Entity ? I don't find any documentation for the moment about that. Actually done: Entity; /** * @ORM\OneToOne(targetEntity="Asset", cascade={"persist",…
1
vote
1 answer

Symfony 4 Issues with vitch

i'm trying to display some pictures on my "website" In order to do so, i'm using Vitch. I did the upload without issues, images are updating into the right folder, but nothing is display when i'm trying to get imgs from my view. There is my Yaml…
Séverine F
  • 73
  • 1
  • 7
1
vote
1 answer

VichUploaderBundle & OneToOne Relation

[Update]: I resolved my problem ><, probably when i have done refactoring i left an ":?string" on my method getFile ... Today i tried to add VichUploderBundle in my project, but i have encountered some trouble. I have follow the documentation but i…
NSBX
  • 11
  • 6
1
vote
0 answers

Upload multiple images in Sonata Admin Symfony 4.2

I'm trying to build a CRUD function in Sonata Admin and want to upload images at Product Admin (not Image Admin). But I got this error and didn't know why when I click Edit: Mapping not found for field "images" I'm new in Symfony. I uploaded…
Ben
  • 75
  • 1
  • 14
1
vote
4 answers

How to fix error when trying to delete file

I'm creating a website which show project I made. So when I'm adding a new project, I don't want to modify my database myself. So with the bundle easyAdmin, I create an admin form to manage them. For upload a file I'm using the bundle vichuploader.…
J.Doe
  • 45
  • 5
1
vote
1 answer

The file "" does not exist (VichUploaderBundle)

My problem is that when i try to upload an mp3 file using VichUploadBundler in combination with sonata-admin, i get the following error when i upload the file. "The file "" was not found" I aleady have another form inside my project where i upload…
Benjamin Gil
  • 127
  • 1
  • 12
1
vote
2 answers

I can't have more than 2 vichuploader mappings | symfony 3.4

I am completely desperate !! I ask for your help! it's been almost two weeks now that I block on this point and I do not sleep almost at night :-( the context: Symfony 3.4 vich-uploder "^ 1.4" I get this exception: SQLSTATE[23000]: Integrity…
Moh
  • 39
  • 1
  • 11
1
vote
1 answer

VichUploaderBundle: Disable automatic image render in twig form

How do I disable the automatic image render when using VichUploaderBundle? I am displaying the images separately in my twig form, so do not need VichUploaderBundle to render the image. My code can be seen below: /** * @Route("/testupload",…
1
vote
2 answers

Where do I need to put the yaml file for VichUploaderBundle in Symfony 4?

I am having trouble installing the bundle. I have followed the instruction in the document. I have successfully installed the package as I saw the vich folder created in the vendor folder. And I have created and put the vich_uploader.yaml file…
reddy
  • 1,721
  • 3
  • 16
  • 26
1
vote
2 answers

vich uploader and easy admin images not showing

I'm following the tutorial from (https://symfony.com/doc/master/bundles/EasyAdminBundle/integration/vichuploaderbundle.html) I was able to upload the image, but it´s not appearing in the list view of easy-admin. It goes like…
1
vote
1 answer

In Symfony, find() method return null on entity with one to one unidirectional relation

The title may not be so clear so I'll explain in detail here (I must miss something obvious but I can't figure out what). I'm using the Vich uploader bundle to store pictures in my project. I have two entity linked with an unidirectional one to one…
Zoldir
  • 21
  • 1
1
vote
1 answer

VichUploaderBundle raise error on delete/update product

i uses symfony 4 and VichUploaderBundle to handle images of my web-project. i did everything according to documentation vich_uploader: db_driver: orm mappings: article_image: uri_prefix: /image/articles …
Stanley
  • 13
  • 2
1
vote
0 answers

Multi-image upload with VichUploaderBundle and EasyAdminBundle

I'm using EasyAdminBundle in Symfony 4 and I would like to create a multiple image upload in my form with VichUploaderBundle (or without), but I can't find any updated documentation for Symfony 4, I do not know what to do to make it work. I created…
Valentin Harrang
  • 1,081
  • 2
  • 17
  • 34
1
vote
1 answer

Symfony VichUploader : Cannot see file button to upload

Hello I am testing symfony and i would like to upload file using VichUploaderBundle i am trying to use VichUploader but it does not display input type file. I am using Symfony 3.4 I have followed the tutorial in symfony website related to…
mokas
  • 13
  • 8
1
vote
1 answer

VichUploaderBundle an Gaufrette

"vich/uploader-bundle": "^1.4.2" and "knplabs/knp-gaufrette-bundle": "0.5" Symfony 3 my config: vich_uploader: db_driver: orm storage: gaufrette mappings: customer_logo: uri_prefix: /upload/customer_logos …
Moccine
  • 1,021
  • 6
  • 14