ID:1792558
 
Code:
Upload form: (Partial, not the entire page)
<form enctype="multipart/form-data" action="?p=servermanager&action=upload" method="POST" name="upload-form">
<input type="file" name="thefile" value="..."/>
<input type="submit" name="enviar" value="Upload..."/>
</form>


Now the handling of the upload:
...
else if(href_list["p"]=="servermanager" && href_list["action"] == "upload")
var/file_ref = href_list["thefile"]
if(file_ref)
var/my_file = locate(file_ref)
if(my_file)
fcopy(my_file,"uploads/[my_file]")
usr << "Uploaded: " + my_file
...


Problem description:
I am attempting to make file uploads possible through a DMCGI application,
however, the example above does not work, though it is the logical way you would achieve it in DM.

Any clue as to how to achieve file uploads?