summaryrefslogtreecommitdiff
path: root/tests/blob.ur
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-04-25 14:35:49 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-04-25 14:35:49 -0400
commitfed2930b7cf791909b9f5e073720bdc4e170acad (patch)
tree71212823b38e6c57adf86e66184c7c6a00c451bc /tests/blob.ur
parent6c83085b52f4c2d6cd9a8d35f1957acdc5e8b55b (diff)
Only allow single-file upload per control
Diffstat (limited to 'tests/blob.ur')
-rw-r--r--tests/blob.ur13
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>