Uploading Files

5 views
Skip to first unread message

Dennis

unread,
Dec 3, 2009, 5:22:49 PM12/3/09
to FubuMVC Development Group
How do you handle uploading files when using...

<input type="file" />

?

Thanks
Dennis

Chad Myers

unread,
Dec 3, 2009, 5:38:08 PM12/3/09
to fubumv...@googlegroups.com
Have a property of type HttpFileBase (I think this is what it's called -- it's from ASP.NET) on your INPUT model with the same name as the "name" attribute on the <input> tag.

-Chad


--

You received this message because you are subscribed to the Google Groups "FubuMVC Development Group" group.
To post to this group, send email to fubumv...@googlegroups.com.
To unsubscribe from this group, send email to fubumvc-deve...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/fubumvc-devel?hl=en.



Ryan Kelley

unread,
Dec 3, 2009, 7:56:34 PM12/3/09
to fubumv...@googlegroups.com
we do ours a bit different, but that is because I didn't know about this. We just check the request, but I will definitely look into this.

-Ryan

Chad Myers

unread,
Dec 3, 2009, 8:18:59 PM12/3/09
to fubumv...@googlegroups.com
It *should* work, at least.

AggregateDictionary contains the Request's "Files" collection, so DictionaryConverter *should* pick it up properly.

See AggregateDictionary line 21 in fubu/trunk.

-Chad

Dennis

unread,
Dec 4, 2009, 8:51:37 AM12/4/09
to FubuMVC Development Group
@Chad

It works. Thank you.
Reply all
Reply to author
Forward
0 new messages