1
我有這個應該上傳文件的api。該代碼旨在查找上傳文件的位置,在$request->files
中,但該變量爲空。相反,我在$content
中找到它的字符形式( )。這種行爲是否有缺陷或我缺少什麼? 我檢查了composer.json
,但沒有上傳(Vich或DoctrineExtensions)軟件包,也沒有配置。我可以設置其中一個,但我不知道目前的行爲是否是錯誤的,或者以前的開發人員比我更瞭解這方面的情況?作爲blob上傳的文件
爲了記錄在案,我有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
詩File類的YAML文件看起來類似於一個:將文件都應該是作爲文件保存在數據庫中沒有一個斑點。