If you're using Camping 2.0 stuff off github, file uploads work exactly as they do in regular rack, so search around for rack upload examples. :)

In camping 1.5, it works quite similarly, like this:

input.fieldname.tempfile.length #=> how many bytes long it is
input.fieldname[:type] #=> mimetype of upload
input.fieldname.tempfile.read #=> gets you the files contents... tempfile will be some kind of an IO object.

I think you can do .filename also, but I don't use it in my projects.

Rack is similar, though at least in builds before Mash got in on the action, the syntax was a bit different.
_______________________________________________
Camping-list mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/camping-list

Reply via email to