Created
June 15, 2018 16:16
-
-
Save dredozubov/a11f84bff87ca1335d57b3bfc60f0ddd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
allow mime text/plain | |
allow mime image/png | |
allow mime image/gif | |
upload |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val main : unit -> transaction page |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment