File uploads

8 views
Skip to first unread message

Tobi Kremer

unread,
Dec 5, 2012, 3:46:28 AM12/5/12
to rose-htm...@googlegroups.com
Hi all,

I'd like to create a custom form field for image uploads that takes care of checking the MIME type and file size of the uploaded file, creates a scaled version and returns an Imager object which I can then save to its final destination from my Catalyst controllers, but I don't even know how to get at the upload data from the field class. I took a look at Rose::HTML::Form::Field::File, but this does nothing more than changing the HTML input type from "text" to "file", giving me just the filename of the uploaded file.

Any hints?

Cheers,
Tobi

John Siracusa

unread,
Dec 5, 2012, 8:52:46 AM12/5/12
to rose-htm...@googlegroups.com
Getting at file upload data will be done through your web framework,
not through the HTML widget toolkit. The only thing Rose::HTML::*
will do is let you name your file upload field. But you'll have to
ask Catalyst (or apache or whatever) for the file data uploaded under
the field of that name.

-John
Reply all
Reply to author
Forward
0 new messages