Update app.py
Browse files
app.py
CHANGED
|
@@ -152,7 +152,7 @@ async def download_file_from_drive(file_id: str) -> Tuple[bytes, str]:
|
|
| 152 |
try:
|
| 153 |
url = f"https://drive.google.com/uc?export=download&id={file_id}"
|
| 154 |
|
| 155 |
-
async with httpx.AsyncClient() as client:
|
| 156 |
response = await client.get(url)
|
| 157 |
if response.status_code == 200:
|
| 158 |
return response.content, response.headers.get('content-type', 'application/octet-stream')
|
|
|
|
| 152 |
try:
|
| 153 |
url = f"https://drive.google.com/uc?export=download&id={file_id}"
|
| 154 |
|
| 155 |
+
async with httpx.AsyncClient(follow_redirects=True) as client: # Enable redirect following
|
| 156 |
response = await client.get(url)
|
| 157 |
if response.status_code == 200:
|
| 158 |
return response.content, response.headers.get('content-type', 'application/octet-stream')
|