diff options
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> |