The error is the following:
The file "C:\xampp\tmp\php5B9.tmp" does not exist 500 Internal Server Error - FileNotFoundException Stack Trace in vendor\symfony\symfony\src\Symfony\Component\HttpFoundation\File\File.php at line 37
I use Symfony 2.8, VichUploader 1.3.1, and YML entity config
My formType:
$builder ->add('name') ->add('frontImage', VichImageType::class, array( 'required' => false, ));
My config file:
<pre>
vich_uploader:
db_driver: orm
mappings:
category_image:
uri_prefix: /images/categories
upload_destination: %kernel.root_dir%/../web/images/categories
namer: vich_uploader.namer_uniqid
My entity:
AppBundle\Entity\Category: type: entity table: category repositoryClass: AppBundle\Repository\CategoryRepository gedmo: soft_deleteable: field_name: deletedAt time_aware: false tree: type: nested id: id: type: integer nullable: false unsigned: true id: true generator: strategy: IDENTITY fields: name: type: string nullable: true length: 100 fixed: false column: name type: type: ModelObjectType length: 20 nullable: false visible: type: boolean nullable: true deletedAt: type: datetime nullable: true frontImageName: type: string length: 255 nullable: true deviceAlertThreshold: type: integer nullable: true unsigned: true lft: type: integer nullable: true gedmo: - treeLeft rgt: type: integer nullable: true gedmo: - treeRight lvl: type: integer nullable: true gedmo: - treeLevel oneToMany: categoryParameter: targetEntity: CategoryParameter mappedBy: category cascade: [all] orphanRemoval: true children: targetEntity: Category mappedBy: parent cascade: [remove] orderBy: lft: ASC devices: targetEntity: Device mappedBy: category manyToOne: root: targetEntity: Category joinColumn: referencedColumnName: id onDelete: CASCADE gedmo: - treeRoot parent: targetEntity: Category inversedBy: children joinColumn: referencedColumnName: id onDelete: CASCADE gedmo: - treeParent lifecycleCallbacks: { }
Config in the resources/config/vich_uploader:
AppBundle\Entity\Category: frontImage: mapping: category_image filename_property: frontImageName
HELP PLEASE!