From 3ad3130a7006e0a0fb4029d3acd46a4344c4f70a Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Sat, 25 Apr 2009 13:59:11 -0400 Subject: Initial support for blobs and upload --- tests/blob.ur | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 tests/blob.ur (limited to 'tests/blob.ur') diff --git a/tests/blob.ur b/tests/blob.ur new file mode 100644 index 00000000..a62eefc1 --- /dev/null +++ b/tests/blob.ur @@ -0,0 +1,22 @@ +sequence s +table t : { Id : int, Nam : option string, Data : blob, Desc : string } + +fun save r = + if numFiles r.Data <> 1 then + error Please submit exactly one file. + 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 + +and main () = return +
+ + + + +
-- cgit v1.2.3