Version 0 of Naviserver File Upload Example

Updated 2016-03-29 15:42:18 by Siqsuruq

Hello, Im trying to learn Naviserver, but got stuck with file upload, and cant figured it out. Can you please provide some practical example how to access and save uploaded file to folder in server. For example:

<form  action="save_files" method="post" enctype="application/x-www-form-urlencoded">
        <input type="file" id="fileinput" name="f1" />
        <input type="file" id="fileinput" name="f2"/>
        <input type="file" id="fileinput" name="f3"/>
        <button name="send" type="submit">SEND</button>
</form>

So in this case how proc to save files should look like? Why ns_conn files not returning values?

proc save_files {} {
        set r [ns_conn form]
        set f1 [ns_set get $r f1]
        set f2 [ns_set get $r f2]
        set f3 [ns_set get $r f3]
        ??????????
}

Thank you. Sorry for dumb questions.