-
-
Save evsapi/2697510 to your computer and use it in GitHub Desktop.
IDrive - EVS - REST API - downloadFile
This file contains hidden or 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
| <% | |
| 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 user name]" | |
| pwd = "[your 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() | |
| %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment