我一直在嘗試像兩天,每次我上傳圖像,在數據庫中,我在頭像列中得到空,它甚至沒有上傳! 我使用symfony的1.4我都sfdoctrineguard和sfforkeddoctrineapplyplugin(我認爲這是問題,因爲我記得當我第一次使用它上傳工作之前開工的項目)與symfony上傳頭像始終爲空
我正在使用的代碼在本教程:
http://blog.firehist.org/2010/02/21/symfony-upload-dimage-sans-dupliquer-les-fichiers/
我想我有同樣的問題,因爲這傢伙:
http://oldforum.symfony-project.org/index.php/m/88206/
沒有任何人使用sfforkedappluplugin成功上傳頭像?
這是我的用戶模式:
User:
inheritance:
type: column_aggregation
extends: sfGuardUserProfile
columns:
sexe:
type: string(1)
notnull: true
birthday:
type: timestamp
photo:
type: string(255)
thumbnail:
type: string(255)
mobile:
type: string(50)
notnull: true
unique: true
address:
type: string(255)
notnull: true
ip_inscription:
type: string(32)
is_online:
type: boolean
default: 0
status:
type: string(255)
aboutme:
type: string(255)
我的分身屬性爲照片!
所以任何想法如何解決這個問題? 順便說一句,我試圖正常Jobeet的1.4教程使用簡單sfwidgetforminputfile上傳,並沒有工作:( 也是我做了我的照片文件夾777和我做了www數據它的主人!
我不知道是否有幫助,但: $ this-> form-> getValue('photo'); $ request-> getFiles($ this-> form-> getName())是空的! – Ray