fix: Avoid extra stream copy to memory/temp if we can determine the size
On my local setup the stream was seekable and reported the proper size, so I think we can actually avoid the extra effort to copy the stream beginning to memory to determin which upload mechanism to use for cases where a size is reported. The fallback is still in place if the stream reports 0 or null as the size.
Introduced with https://github.com/nextcloud/server/pull/27877/files#diff-030e38a9e621019981acf91654c1d8d3a12ab3150dbd9fcc4c280479b8c853dbR144-R148
Test case needed adjustment since the implementation of a NonSeekableStream falsely reported to be seekable on its metadata.
https://github.com/nextcloud/server/pull/38763 might be the reason why this wasn't working as expected on the mentioned setup
Man, this would really help. Where did the stream behavior change? Is there a chance that I bakcport it already for our Next (V25) release or later - as MagentaCLOUD will hopefully move fast to V27 in fall?
If I understand it right the behavior change comes from https://github.com/nextcloud/server/pull/34232, which is not merged to stable 24. I assume if I backport both, this could work, right?
Thanks.