Return base64 value of the archived data

pull/5/head
Alexandre Dulaunoy 2016-03-20 11:43:29 +01:00
parent a0b6ee7392
commit 9c5467a363
1 changed files with 3 additions and 2 deletions

View File

@ -26,13 +26,14 @@ def handler(q=False):
else: else:
misperrors['error'] = "Link is missing" misperrors['error'] = "Link is missing"
return misperrors return misperrors
r = {'results': [{'types': mispattributes['output'], 'values': tocache, 'data': data}]} enc_data = str(data)
r = {'results': [{'types': mispattributes['output'], 'values': tocache, 'data': enc_data}]}
return r return r
def __archiveLink(archive_path, tocache): def __archiveLink(archive_path, tocache):
archiver = url_archiver.Archive(archive_path=archive_path) archiver = url_archiver.Archive(archive_path=archive_path)
return archiver.fetch(url=tocache) return archiver.fetch(url=tocache, armor=True)
def introspection(): def introspection():
return mispattributes return mispattributes