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
0 answers

VichUploaderBundle Symfony3 imageFile returns null

Uploading an image via form works like intended. imageName, imageSize and updatedAt fields change in database as they should. However when trying to get that uploaded image to render in a twig template it returns imageFile as null QuestionType form…
1
vote
1 answer

Unable to find template "VichUploaderBundle:form:fields.html.twig"

Im using Symfony 4 + Easyadmin bundle and I've got a problem, not sure if its a bug or not. What I have done: easy_admin.yaml easy_admin: easy_admin: entities: Category: class: App\Entity\Category list: fields: ["id",…
DrBeef
  • 11
  • 2
1
vote
1 answer

try edit record in symfony (file VichUploaderBundle)

I try edit record in Symfony .i can edit text record but I cannot edit a new file on record.((file saved in Storage but don't save on database)) How i can do that in Symfony 3.4 with VichUploaderBundle 1.4 ... for insert, I have not any problem I…
pedram shabani
  • 1,654
  • 2
  • 20
  • 30
1
vote
1 answer

vich upload image cannot null when remove

I have a problem, I use EasyAdminBundle and VichUploaderBundle on my site. The concern is that when I delete an image it returns an error, which is the following: Integrity constraint violation: 1048 Le champ 'image' ne peut être vide…
Lilith
  • 165
  • 1
  • 15
1
vote
1 answer

Insert Image from Symfony path with PHPExcel

I'm trying to insert images in my Excel using the PHPExcel_Worksheet_Drawing of PHPExcel (in this Symfony Bundle) but I get this message all the time: File…
VinZ
  • 360
  • 3
  • 18
1
vote
3 answers

Vich Uploader is uploading images but not finding them afterwards

The upload of my images with the Vich Uploader Bundle is working fine, they are stored in the correct directory and in the database. However when trying to access them or display them, they are not find. (Object not found exception or just…
sonja
  • 924
  • 1
  • 21
  • 52
1
vote
1 answer

VichUploader: reupload image on entity update

I have entity Asset with field image /** * @ORM\Table(name="asset") * @ORM\Entity(repositoryClass="AppBundle\Repository\AssetRepository") * @Vich\Uploadable */ class Asset { /** * @ORM\Column(name="name", type="string",…
misha
  • 191
  • 1
  • 4
  • 15
1
vote
0 answers

symfony vich uploader image_name cannot be null

I tried to follow documentation of VichUploaderBundle but things doesn't seem to work as expected. I get the error SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'image_name' cannot be null Of course questions about it were asked…
Arkadiusz Galler
  • 305
  • 3
  • 18
1
vote
1 answer

Symfony 3. Problems with join and the VichUploaderBundle

I load several pictures with the Vichuploaderbundle and the EntryImg Entity. That is successful! I have also an Entity named Entries. Each Entry should be linked with one or more Images I want to join both Entities in the Repository. What is the…
Adares
  • 9
  • 3
1
vote
1 answer

Vich and gaufrette are not saving files in sonata admin

I'm trying to make an upload linked to an entity in Sonata Admin using Vich. All the configuration is done but the file does not upload, and I cannot find the error. The problem is that when y try to upload the file, every thing seem to work fine,…
Krleza
  • 87
  • 12
1
vote
1 answer

getClientOriginalName() undefined method

Im working in a symfony3 project where i have a onetomany relation to upload multiple files with VICH UPLOADER, and save each file as separated entity. First entity is "Message", and has a onetomany relation with "MessageAttachment". Message…
user1185430
  • 35
  • 2
  • 7
1
vote
1 answer

Make file not nullable in VichUploaderBundle

I'm using VichUploaderBundle in my Symfony2.8 application to add file attribute to my entity. Please see code of entity below. namespace WebsiteBundle\Entity; use Doctrine\ORM\Mapping as ORM; use Gedmo\Mapping\Annotation as Gedmo; use…
1
vote
1 answer

EasyAdminBundle and VichUploaderBundle - Error: The expected argument of type"", "Symfony\Component\HttpFoundation\File\UploadedFile" given

I'm using EasyAdminBundle for entity management and to upload images I want to useVichUploaderBundle. Following the documentation configure the…
juanitourquiza
  • 2,097
  • 1
  • 30
  • 52
1
vote
0 answers

Serialization UploadedFile

If I have an upload User form (setting one field of an entity to UploadedFile), then the serialization of this entity will fail, since UploadedFile ($imageFile) is not serializable. [1/2] Exception: Serialization of …
famas23
  • 2,072
  • 4
  • 17
  • 53
1
vote
3 answers

Serialization of UploadedFile is not allowed

I'm trying to upload a file via vichuploader bundle on my Users entity. Using hwioauthbundle that implements UserInterface, and i think the errors comes from that bundle... So every time i try to uplod a file i got this exception : Serialization…
famas23
  • 2,072
  • 4
  • 17
  • 53