Last active
March 13, 2016 05:31
-
-
Save goldalworming/6c4d88ef67a65050ef58 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def uploadfile(filepath, uploadurl, fileformelementname="upfile"): | |
''' | |
This will invoke an upload to the webserver | |
on the VM | |
''' | |
files = {fileformelementname : open(filepath,'rb')} | |
r = requests.post(uploadurl, files=files) | |
return r.status_code | |
uploadStatus = uploadfile(currentFile.fullpath, UPLOADURL, "upfile") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment