kinlane
4/15/2012 - 7:58 PM

IDrive - EVS - REST API - downloadFile

IDrive - EVS - REST API - downloadFile

<%
import sys, urllib, urllib2
from poster.encode import multipart_encode
from poster.streaminghttp import register_openers

from xml.dom.minidom import parseString
import xml.dom.minidom as xdm

register_openers()

uid = "[your IDrive user name]"
pwd = "[your IDrive user password]"

# With the URL Upload File
base_url = '[base URL from previous getServerAddress]'

url = base_url + '/evs/downloadFile '

targetfile = '[path where you are downloading from]'

values = {'uid':uid,
'pwd':pwd,
'p':targetfile,
'version':'1',
'thumbnail_type':'I'
}

data, headers = multipart_encode(values)
    
request = urllib2.Request(url, data, headers)
request.unverifiable = True
response = urllib2.urlopen(request)
the_page = response.read()
%>