-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable fseek for files in S3 storage #20033
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐘
*/ | ||
private static function registerIfNeeded() { | ||
if (!self::$registered) { | ||
stream_wrapper_register( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stream_wrapper_register() will return FALSE if the protocol already has a handler.
https://www.php.net/manual/en/function.stream-wrapper-register.php
Do we really need a state (registered y/no)? I guess stream_wrapper_register
will not register more than one handler for one protocol.
Needs a rebase |
Signed-off-by: Lukas Stabe <lukas@stabe.de>
Signed-off-by: Robin Appelman <robin@icewind.nl>
…return the wrong range Signed-off-by: Robin Appelman <robin@icewind.nl>
c458bab
to
3ba46f3
Compare
@icewind1991 please address the comments and then lets get this in |
Signed-off-by: Robin Appelman <robin@icewind.nl>
b48013f
to
e22a28e
Compare
@rullzer @icewind1991 Do we want to backport this to 17 and 18? |
/backport to stable18 |
/backport to stable17 |
The PR nextcloud#20033 added support for `fseek` for the S3 storage backend. However, the seek mode SEEK_END was left out that time. This PR fills this gap. Signed-off-by: Pauli Järvinen <pauli.jarvinen@gmail.com>
The PR #20033 added support for `fseek` for the S3 storage backend. However, the seek mode SEEK_END was left out that time. This PR fills this gap. Signed-off-by: Pauli Järvinen <pauli.jarvinen@gmail.com>
The PR #20033 added support for `fseek` for the S3 storage backend. However, the seek mode SEEK_END was left out that time. This PR fills this gap. Signed-off-by: Pauli Järvinen <pauli.jarvinen@gmail.com>
The PR #20033 added support for `fseek` for the S3 storage backend. However, the seek mode SEEK_END was left out that time. This PR fills this gap. Signed-off-by: Pauli Järvinen <pauli.jarvinen@gmail.com>
Based on the work of @ahti in #19073
Adjusted to be generic of any http stream where the server supports range requests so it's easy to extend to other storage backends in the future