Skip to content

Commit

Permalink
update for data proxy change
Browse files Browse the repository at this point in the history
  • Loading branch information
maedoc authored Mar 14, 2022
1 parent 9060a82 commit 158dd35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sync_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

def upload(fname):
hdr = {'Authorization': 'Bearer ' + get_token()}
ul_url = requests.put(api + f'buckets/hip-tvb-app/{fname}', headers=hdr).json()['url']
ul_url = requests.put(api + f'buckets/hip-tvb-app/{fname}', params={'redirect':'false'}, headers=hdr).json()['url']
# file is too big to naively put
# with open(fname, 'rb') as fd:
# resp = requests.put(ul_url, data=fd.read())
Expand All @@ -19,7 +19,7 @@ def upload(fname):

def download(fname):
hdr = {'Authorization': 'Bearer ' + get_token()}
ul_url = requests.get(api + f'buckets/hip-tvb-app/{fname}', headers=hdr).json()['url']
ul_url = requests.get(api + f'buckets/hip-tvb-app/{fname}', params={'redirect':'false'}, headers=hdr).json()['url']
print(repr(ul_url))
# file is too big to naively put
# with open(fname, 'rb') as fd:
Expand Down

0 comments on commit 158dd35

Please # to comment.