Spaces:
Running
Running
Commit
·
c29dc6c
1
Parent(s):
a0f1e72
Code Updates & Optimisations :Server Upgrade Test
Browse files
FileStream/server/Functions/downloader.py
CHANGED
@@ -102,8 +102,11 @@ def parse_range(range_header: str, file_size: int):
|
|
102 |
from_bytes = int(from_bytes)
|
103 |
until_bytes = int(until_bytes) if until_bytes else file_size - 1
|
104 |
else:
|
105 |
-
from_bytes =
|
106 |
-
until_bytes =
|
|
|
|
|
|
|
107 |
return from_bytes, until_bytes
|
108 |
except ValueError:
|
109 |
return None, None
|
|
|
102 |
from_bytes = int(from_bytes)
|
103 |
until_bytes = int(until_bytes) if until_bytes else file_size - 1
|
104 |
else:
|
105 |
+
from_bytes = 0
|
106 |
+
until_bytes = file_size - 1
|
107 |
+
#request :web.Request ,
|
108 |
+
#from_bytes = request.http_range.start or 0
|
109 |
+
#until_bytes = (request.http_range.stop or file_size) - 1
|
110 |
return from_bytes, until_bytes
|
111 |
except ValueError:
|
112 |
return None, None
|