tus: make chunk size multiples of 256KiB

Our current chunk size is 25,000,000.

Google and S3 documentation suggests the chunk size to be multiples of 256KiB. MongoDB too.  We aren't using any of those, but I guess no harm doing the same.  From the logs, the values "25,000,000" and "50,000,000" seems to be common.
This commit is contained in:
infinite-persistence 2022-01-06 12:35:08 +08:00
parent ad07ee0de3
commit 555bde87f8
No known key found for this signature in database
GPG key ID: B9C3252EDC3D0AA0

View file

@ -7,7 +7,7 @@ import { LBRY_WEB_PUBLISH_API_V2 } from 'config';
const RESUMABLE_ENDPOINT = LBRY_WEB_PUBLISH_API_V2;
const RESUMABLE_ENDPOINT_METHOD = 'publish';
const UPLOAD_CHUNK_SIZE_BYTE = 25000000;
const UPLOAD_CHUNK_SIZE_BYTE = 25 * 1024 * 1024;
const STATUS_CONFLICT = 409;
const STATUS_LOCKED = 423;