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

Mapping not found for field "image" vichupolader symfony2

I'm trying to make a OneToOne relation between an Image entity and a user Entity Like that : Image : /** * Image * * @ORM\Table(name="image") * @ORM\Entity(repositoryClass="SocialNetworkBundle\Repository\ImageRepository") * @Vich\Uploadable…
walidtlili
  • 840
  • 2
  • 13
  • 36
4
votes
1 answer

Symfony VichUploaderBundle doesn't upload file neither write to database

I've been trying 4 times with no luck before post this issue. I read the documentation carefully and after installing VichUploaderBundle I created my code to upload a song as follow: Entity/Model namespace AppBundle\Entity; use Doctrine\ORM\Mapping…
Meeku
  • 53
  • 2
  • 7
4
votes
1 answer

Symfony dustin10/VichUploaderBundle events

I am using dustin10/VichUploaderBundle to upload images. I am using the Gregwar/ImageBundle to resize the images. dustin10/VichUploaderBundle has a POST_UPLOAD event. How do I trigger the event. I have read the docs but it doesn't say how to trigger…
user742736
  • 2,629
  • 5
  • 30
  • 40
4
votes
5 answers

Problems with VichUploaderBundle render image using twig

I have a problem with VichUploaderBundle, I followed all the instructions and I could make it upload an image, now I don't know how to render the images using twig. I have a Product entity which has a OneToOne relation with Photo (I use entity photo…
Mauro Alvarez
  • 550
  • 6
  • 27
4
votes
2 answers

Symfony2 + SonataAdmin + VichUploaderBundle - Image Upload Field

Spent last days trying, as a newcomer to Symfony find a good solution on integrating a image upload field in an existing Entity in Sonata Admin. I've been Googling and following guides available but unfortunately I cannot figure it out. Setup as…
3
votes
2 answers

Symfony 5. EasyAdmin 3. VichUploader. Upload multiple files at the same time

I had a perfectly working multi files upload. Upload one file at a time with one "browse" button. It's basically a Places entity that can have Many images. I am trying to modify it to upload all files at once through only one "browse" window. Select…
laneboyandrew
  • 290
  • 6
  • 17
3
votes
1 answer

How to display an image in the admin console with EasyAdmin 3.0 and VichUploader?

I've got an entity with an image and I'm using EasyAdmin 3.0 and VichUploader 1.14 to upload the image in the admin console. My problem is that I can't get the image displayed in the admin console. How can I do that ? Here's my entity : class…
3
votes
1 answer

Set a placeholder and rename 'browse' button

I use Vich Uploader bundle for SF 4.0 in Bootstrap. I would like to set a placeholder and rename 'browse' button. I have tried to : Use 'placehoder' attribute (FormType.php) {{ form_widget(form.imageFile, { 'attr': {'class': 'form-control',…
z0om
  • 133
  • 1
  • 10
3
votes
1 answer

Symfony vich uploader and doctrine loggable extension problem?

I am using this two libraries to create an entity that has a picture using vich/uploader-bundle and I am logging entity changes history using the loggable doctrine extension provided from stof/doctrine-extensions-bundle which provides the extension…
Simeon Kolev
  • 606
  • 1
  • 4
  • 17
3
votes
1 answer

Symfony 4 easy admin and vich uploader bundle error

I am using vich-uploader bundle with easy-admin with symfony4. After setup i'm getting this error when trying to delete or update entity Expected argument of type "string", "NULL" given at property path "imageName". The config of application is…
Serega Belous
  • 401
  • 1
  • 3
  • 9
3
votes
2 answers

How do Display Image Thumbnail before Form Submit in Vich Uploader?

I'm using Vich Uploader Bundle to submit one image per form, I'd like to be able to display a thumbnail of the image before it's uploaded because as it is, the image is uploaded and nothing is shown or done to indicate that anything happened. I…
Dan185
  • 356
  • 3
  • 12
3
votes
2 answers

liip_imagine with vich_uploader not creating cache

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…
Yamen Nassif
  • 2,416
  • 2
  • 24
  • 48
3
votes
1 answer

Symfony 2.7 Render image in twig with VichUploaderBundle

I have a Symfony 2.7 with VichUplaoderBundle and when I try to render a image I have this error: An exception has been thrown during the rendering of a template ("Mapping not found for field "ntec_image"") in ntec/ntec_edit.html.twig at line…
Roger Guasch
  • 412
  • 5
  • 19
3
votes
1 answer

Circular reference when using VichUploader with KnpGaufrette and Doctrine in Symfony2

I tried to use the following setup in my Symfony2 project: VichUploader Bundle for handling file uploads KnpGaufrette Bundle which should be used by VichUploader as a storage adapter Problem: As soon as i try to use the Gaufrette storage adapter…
delbertooo
  • 840
  • 5
  • 10
3
votes
1 answer

simple example for the creation of a custom directory namer

I have read the main idea of how Create a custom directory namer on github. But, I did not manage to know how to start. So, I am wondering if there is simple example for it. Thank you very much.
Amine Jallouli
  • 3,919
  • 8
  • 36
  • 73
1
2
3
16 17