Files uploaded through a form can be retrieved. Here is a form and SJS checking for an uploaded file, and showing it if it exists.
<form enctype="multipart/form-data" action="/upload.sjs" method="POST"> <input type="hidden" name="MAX_FILE_SIZE" value="3000000" /> Send this file: <input name="userfile" type="file" /> <input type="submit" value="Send File" /> </form> <?sjs document.writeln("Filname: "+pow_server.POST_FILENAME+"<br>\n"); document.writeln(pow_server.get_uploaded_file()); ?>
Result:
Filname: test.sh echo hello