Mercurial > urweb
annotate demo/upload.ur @ 1893:9a1097954188
compileC: Link libraries in the right order
This is needed, at least on recent Ubuntu, to fix this linker error
when compiling any Ur/Web application:
ld: /tmp/webapp.o: undefined reference to symbol 'uw_write'
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
---
src/compiler.sml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
author | Anders Kaseorg <andersk@mit.edu> |
---|---|
date | Thu, 21 Nov 2013 14:32:11 -0500 |
parents | 9f2555f06901 |
children |
rev | line source |
---|---|
adamc@776 | 1 fun echo r = |
adamc@776 | 2 if blobSize (fileData r.File) > 100000 then |
adamc@776 | 3 return <xml>Whoa! That one's too big.</xml> |
adamc@776 | 4 else |
adamc@776 | 5 returnBlob (fileData r.File) (blessMime (fileMimeType r.File)) |
adamc@776 | 6 |
adamc@776 | 7 fun main () = return <xml><body> |
adamc@776 | 8 <h1>The Amazing File Echoer!</h1> |
adamc@776 | 9 |
adamc@776 | 10 <form>Upload a file: <upload{#File}/> <submit action={echo}/></form> |
adamc@776 | 11 </body></xml> |