mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06:00
remove 697 GiB upload filesize limit
This commit is contained in:
parent
a0cc4ca4b7
commit
54e1c8d261
|
@ -3,7 +3,7 @@ from __future__ import print_function, unicode_literals
|
||||||
|
|
||||||
"""
|
"""
|
||||||
up2k.py: upload to copyparty
|
up2k.py: upload to copyparty
|
||||||
2022-09-05, v0.19, ed <irc.rizon.net>, MIT-Licensed
|
2022-10-30, v0.20, ed <irc.rizon.net>, MIT-Licensed
|
||||||
https://github.com/9001/copyparty/blob/hovudstraum/bin/up2k.py
|
https://github.com/9001/copyparty/blob/hovudstraum/bin/up2k.py
|
||||||
|
|
||||||
- dependencies: requests
|
- dependencies: requests
|
||||||
|
@ -415,7 +415,7 @@ def up2k_chunksize(filesize):
|
||||||
while True:
|
while True:
|
||||||
for mul in [1, 2]:
|
for mul in [1, 2]:
|
||||||
nchunks = math.ceil(filesize * 1.0 / chunksize)
|
nchunks = math.ceil(filesize * 1.0 / chunksize)
|
||||||
if nchunks <= 256 or chunksize >= 32 * 1024 * 1024:
|
if nchunks <= 256 or (chunksize >= 32 * 1024 * 1024 and nchunks < 4096):
|
||||||
return chunksize
|
return chunksize
|
||||||
|
|
||||||
chunksize += stepsize
|
chunksize += stepsize
|
||||||
|
|
|
@ -3164,7 +3164,7 @@ def up2k_chunksize(filesize: int) -> int:
|
||||||
while True:
|
while True:
|
||||||
for mul in [1, 2]:
|
for mul in [1, 2]:
|
||||||
nchunks = math.ceil(filesize * 1.0 / chunksize)
|
nchunks = math.ceil(filesize * 1.0 / chunksize)
|
||||||
if nchunks <= 256 or chunksize >= 32 * 1024 * 1024:
|
if nchunks <= 256 or (chunksize >= 32 * 1024 * 1024 and nchunks <= 4096):
|
||||||
return chunksize
|
return chunksize
|
||||||
|
|
||||||
chunksize += stepsize
|
chunksize += stepsize
|
||||||
|
|
|
@ -1804,7 +1804,7 @@ function up2k_init(subtle) {
|
||||||
while (true) {
|
while (true) {
|
||||||
for (var mul = 1; mul <= 2; mul++) {
|
for (var mul = 1; mul <= 2; mul++) {
|
||||||
var nchunks = Math.ceil(filesize / chunksize);
|
var nchunks = Math.ceil(filesize / chunksize);
|
||||||
if (nchunks <= 256 || chunksize >= 32 * 1024 * 1024)
|
if (nchunks <= 256 || (chunksize >= 32 * 1024 * 1024 && nchunks <= 4096))
|
||||||
return chunksize;
|
return chunksize;
|
||||||
|
|
||||||
chunksize += stepsize;
|
chunksize += stepsize;
|
||||||
|
|
Loading…
Reference in a new issue