Javadoc
Set the maximum payload size for a single request counted in bytes. This is useful for splitting
bigger uploads into multiple requests. For example, if you have a resource of 2MB and
the payload size set to 1MB, the upload will be transferred by two requests of 1MB each.
The default value for this setting is 10 * 1024 * 1024 bytes (10 MiB).
Be aware that setting a low maximum payload size (in the low megabytes or even less range) will result in decreased
performance since more requests need to be used for an upload. Each request will come with its overhead in terms
of longer upload times.
Be aware that setting a high maximum payload size may result in a high memory usage since
tus-java-client usually allocates a buffer with the maximum payload size (this buffer is used
to allow retransmission of lost data if necessary). If the client is running on a memory-
constrained device (e.g. mobile app) and the maximum payload size is too high, it might
result in an
OutOfMemoryError.
This method must not be called when the uploader has currently an open connection to the
remote server. In general, try to set the payload size before invoking
#uploadChunk()the first time.