DucDigital
DucDigital

Reputation: 4622

Upload file with Backend Form without update to database using Symfony?

I writing a function in my form that require user to upload a file, but doesn't necessary have to save it filename in to my database as the program can automatic detect the file.

I try to use this piece of code:

$this->setWidget('filename', new sfWidgetFormInputFile());

But this required to have a column in database for saving file.

Is there anyway to not use database but include a upload form in symfony 1.4?

Upvotes: 1

Views: 497

Answers (2)

LuisClemente
LuisClemente

Reputation: 385

did you tried to override your updateFilenameColumn method in order to return nothing?

Upvotes: 1

dxb
dxb

Reputation: 931

You don't need a column in your database, but you need a validator in order to complete your form, sfValidatorFile for exemple.

Upvotes: 0

Related Questions