File Upload via iControl REST
Code : def _upload(host, creds, fp):
chunk_size = 512 * 1024
headers = {
'Content-Type': 'application/octet-stream'
}
fileobj = open(fp, 'rb')
filename = os.path.basenam...
Published Nov 05, 2015
Version 1.0JRahm
Admin
Joined January 20, 2005
JRahm
Admin
Joined January 20, 2005
kman_52500
Apr 25, 2016Nimbostratus
Along the lines of what Maverick said, I was also able to get this to work in 11.5.2, although instead of modifying permissions I had to create the directory: "/var/config/rest/downloads/tmp" with no special permissions.
I was getting the following error back that lead me to investigate the creation of that directory.
code: 400, reason: /var/config/rest/downloads/tmp/rest_upload_test.txt (No such file or directory)
It seems like if a hot fix would simply create that directory this would work out of the box in the 11.5 or at least the >= 11.5.2 line.