我已经尝试了两天,每次我上传图片时,在数据库中我的头像列都为空,甚至没有上传!我正在使用 symfony 1.4 我同时拥有 sfdoctrineguard 和 sfforkeddoctrineapplyplugin(我认为这是问题所在,因为我记得我第一次启动项目时才使用它上传工作)
我正在使用本教程中的代码:
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)
我的头像属性是照片!
那么有什么想法可以解决这个问题吗?顺便说一句,我尝试了使用简单的 sfwidgetforminputfile 上传的普通 jobeet 1.4 教程,但它没有用 :( 我也将照片文件夹设为 777,并将 www-data 设为其所有者!