Closed vpecinka closed 1 year ago
Thank you for the PR.
Your current implementation has not obvious limit of 10000 segments. I guess we should either assert it and throw an exception or add another parameter $data['segmentCountFormat']
to createLargeObject
with default value %05d
.
I also want to add an integration test for this case.
added the config option segmentIndexFormat
with default value %05d
and fixed the unit test.
also added isValidSegmentIndexFormat()
to check proper format (has to produce different values for given format and different values, plus result has to have same string length)
For Swift storage and large objects numbers has to be padded with zero for correct segment order.