however, when there is more than 9 parts (segments) the resulting large file will not be restored correctly, as the Swift object storage orders the segments by filename...
As stated here in Swift docs: All the object segments need to be in the same container, have a common object name prefix, and sort in the order in which they should be concatenated. Object names are sorted lexicographically as UTF-8 byte strings.
In the method
createLargeObject()
there is on this line the following constructhowever, when there is more than 9 parts (segments) the resulting large file will not be restored correctly, as the Swift object storage orders the segments by filename...
As stated here in Swift docs: All the object segments need to be in the same container, have a common object name prefix, and sort in the order in which they should be concatenated. Object names are sorted lexicographically as UTF-8 byte strings.
The current code produces something like this
and should produce
therefore I suggest to change the code to this: