diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-05-03 12:49:47 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-05-03 12:49:47 -0400 |
commit | ddac92a3d792b7e7342e4003862cd5ff5c1f0ab8 (patch) | |
tree | 2e285d15430f628b73456a233c5f3d79ea740307 /demo/upload.ur | |
parent | 4be41963bba445bb3bb26d5e05883f7eb72a9a22 (diff) |
upload demo
Diffstat (limited to 'demo/upload.ur')
-rw-r--r-- | demo/upload.ur | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/demo/upload.ur b/demo/upload.ur new file mode 100644 index 00000000..505a1ae4 --- /dev/null +++ b/demo/upload.ur @@ -0,0 +1,11 @@ +fun echo r = + if blobSize (fileData r.File) > 100000 then + return <xml>Whoa! That one's too big.</xml> + else + returnBlob (fileData r.File) (blessMime (fileMimeType r.File)) + +fun main () = return <xml><body> + <h1>The Amazing File Echoer!</h1> + + <form>Upload a file: <upload{#File}/> <submit action={echo}/></form> +</body></xml> |