diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-04-25 14:35:49 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-04-25 14:35:49 -0400 |
commit | 3d0a7f3cd81daaa7d49de95de7fe4eb8d1288876 (patch) | |
tree | 71212823b38e6c57adf86e66184c7c6a00c451bc /tests/blob.ur | |
parent | 2dd6e83e23759ef4f5a27e399e43636881449345 (diff) |
Only allow single-file upload per control
Diffstat (limited to 'tests/blob.ur')
-rw-r--r-- | tests/blob.ur | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/tests/blob.ur b/tests/blob.ur index a62eefc1..37c3f753 100644 --- a/tests/blob.ur +++ b/tests/blob.ur @@ -2,16 +2,9 @@ sequence s table t : { Id : int, Nam : option string, Data : blob, Desc : string } fun save r = - if numFiles r.Data <> 1 then - error <xml>Please submit exactly one file.</xml> - else - let - val f = fileNum r.Data 0 - in - id <- nextval s; - dml (INSERT INTO t (Id, Nam, Data, Desc) VALUES ({[id]}, {[fileName f]}, {[fileData f]}, {[r.Desc]})); - main () - end + id <- nextval s; + dml (INSERT INTO t (Id, Nam, Data, Desc) VALUES ({[id]}, {[fileName r.Data]}, {[fileData r.Data]}, {[r.Desc]})); + main () and main () = return <xml><body> <form> |