/** If a confirmation should be asked for external storages */
bool _confirmExternalStorage;
- /** The initial un-adjusted chunk size in bytes for chunked uploads
+ /** The initial un-adjusted chunk size in bytes for chunked uploads, both
+ * for old and new chunking algorithm, which classifies the item to be chunked
*
- * When dynamic chunk size adjustments are done, this is the
+ * In chunkingNG, when dynamic chunk size adjustments are done, this is the
* starting value and is then gradually adjusted within the
* minChunkSize / maxChunkSize bounds.
*/
return job;
} else {
PropagateUploadFileCommon *job = 0;
- if (item->_size > _chunkSize && account()->capabilities().chunkingNg()) {
+ if (item->_size > syncOptions()._initialChunkSize && account()->capabilities().chunkingNg()) {
+ // Item is above _initialChunkSize, thus will be classified as to be chunked
job = new PropagateUploadFileNG(this, item);
} else {
job = new PropagateUploadFileV1(this, item);
int _chunkCount; /// Total number of chunks for this file
int _transferId; /// transfer id (part of the url)
- quint64 chunkSize() const { return propagator()->syncOptions()._initialChunkSize; }
+ quint64 chunkSize() const {
+ // Old chunking does not use dynamic chunking algorithm, and does not adjusts the chunk size respectively,
+ // thus this value should be used as the one classifing item to be chunked
+ return propagator()->syncOptions()._initialChunkSize;
+ }
public:
// the chunk sizes a bit.
quint64 targetSize = (propagator()->_chunkSize + predictedGoodSize) / 2;
+ // Adjust the dynamic chunk size _chunkSize used for sizing of the item's chunks to be send
propagator()->_chunkSize = qBound(
propagator()->syncOptions()._minChunkSize,
targetSize,