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

VichUploaderBundle: adding Image through Post From not working

I'm using VichUploader in my Symfony2.3 application. I created one to one relationship between my Post entity and Image entity and I'm using Data Transformer for adding images through Post Form. Everything is working well, I'm getting no exception…
shiki
  • 25
  • 4
2
votes
0 answers

"Source image could not be found" when using Symfony3 LiipImageBundle

I have the following error message in my Symfony3 application: This is the Twig code, along with the imagine_filter: This is the local URL generated after applying the LiipImage…
emwww
  • 93
  • 11
2
votes
1 answer

Symfony 3 VichUploaderBundle not moving images to the correct directory

I am attempting to use The VichImageBundle with Symfony3, there is no documentation as of yet for the FormType::class call that is new to S3 in conjunction with the Vich Image Bundle. I have everything working except for the moving part. I have made…
Rick Mason
  • 311
  • 1
  • 5
  • 18
2
votes
2 answers

VichUploaderBundle: How to get related entity ID in DirectoryNamer?

I am configuring a directory namer included in VichUploaderBundle to upload multiple files. I have two entities Soundtrack and Song. The collection of Songs are processed in my controller like this: //... if ($form->isValid()) { …
TMichel
  • 4,336
  • 9
  • 44
  • 67
2
votes
1 answer

how to upload files to Google Cloud Storage with symfony / gauferette / VichUploaderBundle

Good morning, I am uploading my files locally through VichUploaderBundle. Every thing works perfectly. Now I want no more store my files locally: I want to store them on Google Cloud Storage. I found that KnpGaufretteBundle could be used for storing…
2
votes
2 answers

Symfony2 Vich Uploader INTEGRITY CONSTRAINT error

The error I receive is here... An exception occurred while executing 'INSERT INTO users (image_name, updated_at, email, first_name, last_name, start_weight) VALUES (?, ?, ?, ?, ?, ?)' with params [null, "2015-08-13 04:52:18", "wei23849@aldkfj.com",…
Rick Mason
  • 311
  • 1
  • 5
  • 18
2
votes
1 answer

Upload file for each translation

I have a form with fields that are translated. One of this fields is a file, witch must to be uploaded (each language have different file). I am using 'stof/doctrine-extensions-bundle' and 'a2lix/translation-form-bundle' and for uploading files…
What
  • 83
  • 1
  • 2
  • 6
2
votes
1 answer

Symfony 2 - VichUploader can't handle file

I have very strange problem with VichUploader. I have 2 entities where for one of them VichUploader works fine (Download Entity)- it saves file in directory and add record to database table. For second entity (Offer) it doesn't work- it displays…
verdun3r
  • 71
  • 2
  • 9
2
votes
1 answer

Unable to check if Amazon s3 bucket exists using Gaufrette with Symfony2

Getting this error when trying to upload a file to my bucket using VichUploader, Gaufrette and the AWS SDK v2 on a Symfony2 web app. Sounds like a problem with the API calls. It's giving me a Denied Access (Error 500 Interal Server Error) Can…
2
votes
1 answer

Exception generated by PropertyMappingFactory class with trying to the first element of an array with twig

I have a Motors entity having an OneToMany relation with the File entity. Uploading files and linking them is done with VichUploaderBundle. My objective is giving a simple overview of a Motors object by displaying just the first image of that…
Amine Jallouli
  • 3,919
  • 8
  • 36
  • 73
2
votes
1 answer

Unrecognized options "gaufrette" under "vich_uploader"

I got following error when I update the composer.phar... [Symfony\Component\Config\Definition\Exception\InvalidConfigurationException] Unrecognized options "gaufrette" under "vich_uploader" Script…
ganesh
  • 61
  • 6
2
votes
2 answers

Files are not uploaded and temp name is inserted at DB, what I'm doing wrong?

I'm using this bundle for upload files through a form. This is what I have done. In the Twig template where I'm using the bundle
ReynierPM
  • 17,594
  • 53
  • 193
  • 363
2
votes
2 answers

ContextErrorException when uploading file through VichUploaderBundle

I am trying to upload a file based on the VichUploaderBundle. I got this error when implementing it: ContextErrorException: Catchable Fatal Error: Argument 1 passed to Minn\AdsBundle\Entity\MotorsAdsFile::setFile() must be an instance of…
Amine Jallouli
  • 3,919
  • 8
  • 36
  • 73
2
votes
0 answers

VichUploaderBundle and Gaufrette

I tried to install VichUploaderBundle with Gaufrette but i had error: The specified path (gaufrette://users_avatars_fs) is invalid. composer.json "require": { ... "vich/uploader-bundle": "dev-master", "knplabs/gaufrette": "0.2.*@dev", …
Adam Waz
  • 21
  • 2
1
vote
0 answers

Attribute not found with VichuploaderBundle in Symfony 6

I followed the bundle configuration details but I still have the same problem : Attribute class "Vich\uploaderBundle\Mapping\Annotation\Uploadable" not found here is the configuration file 'vich_uploader.yaml'. vich_uploader: db_driver: orm …
ulrich soo
  • 11
  • 2