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
0
votes
1 answer

Symfony BootstrapCollection with VichUploader - element remove does not work

I am using the BootstrapCollection from http://bootstrap.braincrafted.com/ with the VichUploader https://github.com/dustin10/VichUploaderBundle It is working fine except the delete function. If i try to delete a child (PDF File) only the name…
0
votes
1 answer

LiipImagineBundle not working on production environment

I use LiipImagineBundle 1.6.0 on Symfony 3.1.3 combined with VichUploaderBundle 1.2.0 and everything goes fine on dev but on prod he doesn't save cached files. Images are saving correctly so there is rather not a problem of…
Starspire
  • 272
  • 3
  • 15
0
votes
2 answers

Symfony - How to retrieve the image stored in database on my update form?

How to retrieve the image stored in database on my update form? I have set up a Profile entity like that:
Kr1
  • 1,269
  • 2
  • 24
  • 56
0
votes
3 answers

VichUploaderBundle : image_name can't be null error

I'm using Symfony3.1 and I have just installed VichUploaderBundle. I have followed the documentation but I get this error means that Field 'image_name' can not be empty (null) SQLSTATE[23000]: Integrity constraint violation: 1048 Le champ…
hous
  • 2,577
  • 2
  • 27
  • 66
0
votes
2 answers

Symfony/ VichUploaderBundle: DirectoryNamer

I´m trying to implement a DirectoryNamer, but unfortunately this results in an error message and I don´t know what to do next. The Controller (excerpt): if ($form->isSubmitted() && $form->isValid()) { $em =…
Pixelrocker
  • 351
  • 6
  • 19
0
votes
1 answer

Symfony 3 - Form not adding "has-error" class when error occured in VichImageType and custom constraint

Problem view: Problem code: Form: $builder->add('title', Type\TextType::class, [ 'label_attr' => ['class' => 'required label-required'], ]); $builder->add('isPublished'); $builder->add('imageFile', VichImageType::class, [ …
Jazi
  • 6,569
  • 13
  • 60
  • 92
0
votes
2 answers

symfony3 override fields theme from vich bundle

I have installed VichUploaderBundle into my Symfony app and would like to have better control of the appearance of the upload buttons. I have taken the contents of fields.html.twig located in the bundle itself, and copied them into the same file at…
Rick Mason
  • 311
  • 1
  • 5
  • 18
0
votes
1 answer

Symfony3 + VichUploaderBundle + custom upload directory

I have setup VichUploaderBundle with custom file namer and it works fine.. my relevant config.yml: vich_uploader: db_driver: orm mappings: product_image: uri_prefix: '/uploads/products' upload_destination:…
Rikijs
  • 728
  • 1
  • 12
  • 48
0
votes
1 answer

upload image with vich bundle symfony 2

I'm trying to upload an image with VichUploaderBundle but I have this error on form submit: Catchable Fatal Error: Argument 1 passed to PiCrowdRise\WebBundle\Entity\Probleme::setImageFile() must be an instance of…
J.Ghassen
  • 101
  • 1
  • 1
  • 12
0
votes
1 answer

Symfony2: EasyAdminbundle + StofDoctrineExtensionsBundle + VichUploaderBundle

I have a project using EasyAdminBundle for administration. In one Entity called "Post" I have the fields "title", "image" and "post" which I would like to track about changes. The property "image" only stores the filename of the image - the full…
0
votes
1 answer

Admin shows doubled labels

I'm trying to display an admin create form which uses an image upload (vich) but the labels appear to be doubled. What configurations am I missing here? $formMapper ->add('color', null, array('label' => 'label.color')) ->add('image', …
Matt
  • 127
  • 12
0
votes
2 answers

vich upload bundle - image and photo in one entity - Documents only file is stored in DB

I want to upload and store both files: document, and document cover image in my DB. But there is only file column. Second image is not inside. This is how my entity class looks like: class Document { /** * @var int * *…
Krzysztof Koch
  • 59
  • 1
  • 11
0
votes
4 answers

Symfony vichimage upload make two labels in formbuilder

Hi guys fro some reason the form builder make me two labels when i specified my own label. Here is the config for the vich image bundle: vich_uploader: db_driver: orm mappings: product_image: uri_prefix: …
0
votes
1 answer

symfony2 migration bundle refuse to migrate

Hi guys i have integrate in Page CRUD a slug and image upload with the stofdoctrinebundle and vichuploaderbundle. Here is the Entity: namespace George\PageBundle\Entity; use Doctrine\ORM\Mapping as ORM; use George\UserBundle\Entity\User; use…
0
votes
1 answer

Sonata admin Uploading images using vich

I have a one to many relationship between prototype and image, one prototype can have many images. I've tried to use vich and here is what I have: I can upload images but not at the same time. I have to edit, save and then upload the second…
1 2 3
16
17