Hi,

I have tried to upload a file using an HTML::FormFu File element using Catalyst::Controller::HTML::FormFu, and DBIx::Class::InflateColumn::FS, using:

if ($form->submitted_and_valid) {
$form->model->create;
}

The file is inserted in the database but it is created on the hard disk with a size of 0 bytes.

I have also tried to add before ->create:

$form->add_valid({file => $form->param('file')->fh});
$form->process;

and I have also tried to add:

$form->get_element({name => 'file'})->value($form->param('file')->fh);

But it doesn't have any effect.

However, if I use the following syntax, it works fine:

$c->model("DB::Anunturi")->create({
file => $form->param('file')->fh,
});

In this case the file is created correctly on the hard disk.

Is it possible to do just $form->model->create (because I don't want to specify each field) and also save the file successfully?

Thanks.

Octavian


_______________________________________________
HTML-FormFu mailing list
[email protected]
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu

Reply via email to