====== File Upload handling! ====== Make sure you have the `~/folk-uploads` created. # File uploads - Arcade Jun 11 2024 Wish the web server handles route "/upload" with handler { html { Status } } Wish $this is titled "File Upload Reciever" Wish $this is outlined green When /thing/ claims /thing2/ has a file /x/ with filename /fn/ { Commit {Wish $this is labelled $fn} set fp [open /home/folk/folk-uploads/$fn.base64 w] puts -nonewline $fp $x close $fp exec cat /home/folk/folk-uploads/$fn.base64 | base64 -d > /home/folk/folk-uploads/$fn exec rm /home/folk/folk-uploads/$fn.base64 }