I'm having this api that's supposed to upload a file. The code was designed to look for the uploaded file where it should be, in $request->files
but that variable is empty. Instead, I find the image in $content
in it's character form(����). Is this behaviour faulty or am I missing something?
I checked composer.json
but no upload(Vich or DoctrineExtensions) bundle is included nor configured. I could set up one of them but I don't know if the current behaviour is wrong by nature or the previous developer knew something more about this than I do?
For the record, I have the yaml file for the File class that looks similar to the one from DoctrineExtensions - Uploadable
MyApp\FileBundle\Entity\File:
type: entity
table: file_records
repositoryClass: MyApp\FileBundle\Repository\FileRepository
id:
id:
type: integer
generator:
strategy: AUTO
fields:
path:
name: path
type: string
name:
name: string
type: string
mimeType:
name: mimeType
type: string
nullable: true
size:
name: size
type: decimal
nullable: true
initialName:
name: initial_name
type: string
Ps: the files are supposed to be saved as files, not a blobs in database.