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

Upload image using VichUploaderBundle

I have a problem with VichUploaderBundle, I followed all the instructions but I dont know how my Controller should handle this after finished form becouse image failed to uploaded and database did not write. my Entity class:
boosterV
  • 119
  • 2
  • 11
1
vote
1 answer

Dynamic image list in Easy Admin Bundle

I wanna create dynamic image list, user should be able to add unlimited number of images. I'm using vich uploader extension. How to do it in some easy way?
1
vote
1 answer

symfony form with new files via Vich Uploader

Iam trying to build a smarter upload structure for my app. until now I had the code for uploading files in the controller and everything was more manual. Now I want to use the VichUploader in Symfony, but I have problems to implement it with…
Asara
  • 2,791
  • 3
  • 26
  • 55
1
vote
1 answer

Synfony 3 + Vich upload bundle - Failed to set metadata before uploading the file

My problem is to retrieve metadata before uploading the file. My config file: vich_uploader: db_driver: orm mappings: media: uri_prefix: /uploads/ upload_destination:…
Rafael Moreno
  • 23
  • 1
  • 8
1
vote
0 answers

file aren't saved anymore, vichuploader

I'm actually creating an api. I'm using vichuploaderBundler to import file and to put them in a specific directory. Since i use my form to send a POST request to create a resource, my ressource get created but the files aren't saved anymore. Here is…
Che
  • 112
  • 9
1
vote
1 answer

Wrong image path in liip imagine

Im using vich uploader to upload images and oneup flysystem file abstraction. Also liip imagine bundle to make thumbnails. The problem is that liip takes my oneup flysystem adapters local path and tries to find uploads/58998d6502406.png image in it.…
rokas
  • 1,521
  • 9
  • 16
1
vote
2 answers

Could not load type "file" in Symfony3

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…
user2496520
  • 881
  • 4
  • 13
  • 36
1
vote
1 answer

image_name in database is always null vichuploaderbundle symfony2

I'm trying to add a new user with an image file. I'm using VichUpladerBundle and FOSUserBundle. So the new user is created but image_name is always null. This is my Image Entity : namespace SocialNetworkBundle\Entity; use Doctrine\ORM\Mapping as…
walidtlili
  • 840
  • 2
  • 13
  • 36
1
vote
0 answers

Symfony - Not able to setup VichUploaderBundle with FOSRestBundle

My entities are all setup using yml and I am trying to wrap my head around on how to setup VichUploaderBundle. What I am trying to do What I am trying to do is develop an API and I need the user to submit an image with name and I want to save the…
Shairyar
  • 3,268
  • 7
  • 46
  • 86
1
vote
4 answers

VichUploadBundle inb Symfony 3 cant load cache.annotations service

After installing the VichUploadBundle a service can not be loaded. Causing ReflectionException: Class does not exist Followed the installation guide here https://github.com/dustin10/VichUploaderBundle/blob/master/Resources/doc/installation.md This…
Hendrik
  • 73
  • 7
1
vote
2 answers

cant translate name UploadButton in my Form

i got a problem in my form. Im translating all my fields with message.yml and it works. But i have also a upload button from VichUploaderBundle in it. I can translate the label, but when im testing it, the label is in english, but the button is in…
Meister Ho
  • 47
  • 6
1
vote
2 answers

Symfony/ VichUploaderBundle: Remove Entity

I'm using the VichUploader to manage File Uploads in my Symfony 3 Application. Now I wonder how to manage deleting Files/ Entities? Excerpt of the app/config/config.yml: vich_uploader: db_driver: orm mappings: upload_artists: …
Pixelrocker
  • 351
  • 6
  • 19
1
vote
1 answer

Sonata Admin + Vich Upload inject on load not working

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…
Anil Gupta
  • 2,329
  • 4
  • 24
  • 30
1
vote
1 answer

Symfony VichUpIoaderBundle. Uri generation

I'm using Symfony 3 and VichUploader. Here's my config: vich_uploader: db_driver: orm mappings: photo: uri_prefix: /uploads/photo upload_destination: %kernel.root_dir%/../web/uploads/photo Now in my…
Roubi
  • 1,989
  • 1
  • 27
  • 36
1
vote
1 answer

VichUploader uri_prefix not accounting for environment

I am using the VichUploaderBundle in my project. I am unable to get the download link (when using the vich_file form type) to take into account of the environment (notably dev). Which I want to do as I want to route the download function through a…
Rooneyl
  • 7,802
  • 6
  • 52
  • 81