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

mp4-file vichuploader Symfony 5 mime type validation sometimes blocking good videos

In a Symfony 5 project using vich uploader for video uploads defining the field like /** * @Vich\UploadableField(mapping="d_video", fileNameProperty="videoName", size="videoSize") * @Assert\File( * mimeTypes = {"video/mp4"}, * …
1
vote
1 answer

How to use an image created with "imagecreate()" with VichUploader?

I want to generate an image from the PHP function imagecreate() and then persist it thanks to VichUploaderBundle. For you information, I am using Symfony 5.1 Here is my test code I use in my controller: $im = imagecreate(110, 20); $background_color…
Kaharon
  • 365
  • 4
  • 16
1
vote
1 answer

DownLoad VichBundle file Api Platform

I'm using API platform with VichBundle to store file on the back side and React Native on the Front side. I've followed the documentation of API platform and the upload part is working well, but I don't know how to download the document. When I make…
1
vote
0 answers

Symfony - API Platform - Vich Uploader & vulnerability issues

Good morning, I'm trying to develop a smartphone application connected to an API Platform API. I need the option to upload some files from the application. I cannot trust those who send files. I've followed the…
1
vote
0 answers

'Argument 1 passed to Symfony\Bridge\Twig\Extension\TranslationExtension::trans() must be of the type string, null given'

I have a problem to upload a PDF file with vichUploader I have this error errorand this is the line given in the error line 214 this is my the entity Candidat :
EMma
  • 13
  • 4
1
vote
1 answer

Use S3 presigned URL with VichUploader

I am able to use the PHP Symfony bundle Vich-Uploader to upload files to a private bucket in Amazon S3, via the php sdk Flysystem adapter. How can I get a signed/presigned URL for a key, after the upload? I can load the plugin into Flysystem, but…
Kamafeather
  • 8,663
  • 14
  • 69
  • 99
1
vote
1 answer

vichuploader required upload

I want to upload image with VichUploaderBundle inside Collection as a required field. I use use fileType as a new EmbeddedFile() isinde my entity New form If I don't provide file, validation tells me to add a file, expected behaviours. Edit form If…
kl3sk
  • 136
  • 1
  • 11
1
vote
1 answer

Symfony5 easyAdmin - vichUploader

I'm with symfony5. I opted for the easyAdminBundle. In order to upload the images, I try to use vichUploaderBundle. The problem is that it only works once. For example for the Service entity, it only works when I create a new service (ex: seo,…
user8388657
1
vote
2 answers

VichUploaderBundle with symfony 4: no extension able to load the configuration for "mappings"

I'm trying to use VichUploaderBundle to handle a file upload. I work with symfony 4. I have a problem in the first step (Step 1: configure an upload mapping). in the app/config/config.yml file I have: vich_uploader: db_driver: orm mappings: …
lcgd
  • 45
  • 6
1
vote
0 answers

Upload file with VichUploader and ajax/axios

I am trying to set up a form to upload a file with VichUploader & axios/ajax. The form I am sending looks like this on the console: I have set up vich uploader and GNP properly as the form works in non-ajax forms. I have a simple file to upload…
Miles M.
  • 4,089
  • 12
  • 62
  • 108
1
vote
1 answer

VichUploader and LiipImagine : resize and save the uploaded image

i'm working on a symfony project and i'm using vichuploader and liipImagine, so i want to resize an uploaded image and save it (the resized image) in the upload directory, in order to allow users to upload image up to 10Mb and then resize it to…
1
vote
2 answers

Using VichUploaderBundle to upload a file through an API

So, what I need is a basic file upload. What I have is Symfony 4 and VichUploaderBundle, integrated exactly as described https://symfony.com/doc/current/bundles/EasyAdminBundle/integration/vichuploaderbundle.html Entity is marked as…
A. Martyn
  • 85
  • 1
  • 9
1
vote
0 answers

Symfony 4 - Using VichUploader with Dompdf?

I use Dompdf in my symfony 4 project to generate pdf. For rendering the pdf, I make a render on a file twig. And in this twig file, I need to display images that I previously uploaded through VichUploaderBundle. So, in my controller, I enabled this…
eronn
  • 1,690
  • 3
  • 21
  • 53
1
vote
1 answer

Symfony 4 - DomPDF - Display image with VichUploader?

I am looking to create a PDF with DomPDF in my Symfony 4 project. I wish I could insert images from an entity. Images are managed with VichUploaderBundle. Is there a way to display them? For the moment I did this in my twig file …
eronn
  • 1,690
  • 3
  • 21
  • 53
1
vote
1 answer

Symfony 4 - VichUploader - How to remove image preview in edit form?

in my project symfony 4 I implemented the possibility for my users to have an avatar they could upload from their profile page, thanks to VichUploader. To display their current avatar, I use LiipImagineBundle. Except that because of the following…
azzaze
  • 141
  • 2
  • 11