[Haskell-cafe] Problem with Text.XHtml.Strict.Formlets.file on Mac OSX

Colin Adams colinpauladams at googlemail.com
Tue Sep 22 02:56:30 EDT 2009


I'm writing a form that involves picking a file to upload, and so uses
Text.XHtml.Strict.Formlets.file. The form displays OK, but when I
click the Browse button, and select a file from the dialog (no matter
what the file type), and then click on the Submit button, I get an
error:

"fval[2] is not a file"

I haven't added any validation yet.

The generated html looks ok to me:

<input type="file" name="fval[2]" id="fval[2]">

This is on my laptop running Mac OSX. I can't test it on Linux until I
get home at the weekend, so I don't know if I've made a silly error in
my coding, but it is very simple:

imageInputForm = F.plug (\xhtml -> X.p << (X.label << "Image file:")
+++ xhtml) F.file

Are there any known problems with the file formlet? Might it be OSX specific?
-- 
Colin Adams
Preston,
Lancashire,
ENGLAND


More information about the Haskell-Cafe mailing list