As we all know the simplest way to upload a file in php is with this code :
<form action="upload.php" method="post" enctype="multipart/form-data">
<input type="file" name="fileToUpload" id="fileToUpload">
<input type="submit" value="Upload File" name="submit">
</form>
I want a method to upload a file with python the simplest as possible, a file from the current directory like this:
import anyuploadmodule
upload(file)
Is there a such module can do this ?