Spaces:
Sleeping
Sleeping
Update src/routes/download.py
Browse files- src/routes/download.py +1 -1
src/routes/download.py
CHANGED
@@ -40,6 +40,7 @@ async def downloadFunction(name):
|
|
40 |
def download_file(response):
|
41 |
print("Started Streamming")
|
42 |
for chunk in response.iter_content(4096):
|
|
|
43 |
yield chunk
|
44 |
|
45 |
def get_confirm_token(response):
|
@@ -69,7 +70,6 @@ async def downloadFunction(name):
|
|
69 |
try:
|
70 |
file_obj.http = file_obj.auth.Get_Http_Object()
|
71 |
credentials = file_obj.http.request.credentials.__dict__
|
72 |
-
print(credentials)
|
73 |
# response = requests.get(download_url, stream=True)
|
74 |
response = requests.get(download_url, headers={'Authorization': f'{credentials["token_response"]["token_type"]} {credentials["access_token"]}'}, stream=True)
|
75 |
|
|
|
40 |
def download_file(response):
|
41 |
print("Started Streamming")
|
42 |
for chunk in response.iter_content(4096):
|
43 |
+
print(chunk[:20])
|
44 |
yield chunk
|
45 |
|
46 |
def get_confirm_token(response):
|
|
|
70 |
try:
|
71 |
file_obj.http = file_obj.auth.Get_Http_Object()
|
72 |
credentials = file_obj.http.request.credentials.__dict__
|
|
|
73 |
# response = requests.get(download_url, stream=True)
|
74 |
response = requests.get(download_url, headers={'Authorization': f'{credentials["token_response"]["token_type"]} {credentials["access_token"]}'}, stream=True)
|
75 |
|