aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Stream
Commit message (Collapse)AuthorAgeFilesLines
* chore: Add SPDX headerAndy Scherzinger2024-05-244-89/+12
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* fix: Apply new coding standard to all filesCôme Chilliet2024-04-021-3/+3
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* chore: apply changes from Nextcloud coding standards 1.1.1Joas Schilling2023-11-231-12/+12
| | | | | Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* fix SeekableHttpStream::stream_stat errors on failed openRobin Appelman2023-07-131-1/+3
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Fix psalm errors related to filesizesCôme Chilliet2023-02-071-3/+3
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* composer run cs:fixCôme Chilliet2023-01-201-3/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Also update the unencrypted size of files when creating them with empty contentJulius Härtl2022-12-071-0/+1
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Update the unencrypted file size when closing streamsJulius Härtl2022-12-071-1/+1
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* compare cached filesize on downloadMaxence Lange2022-12-011-1/+10
| | | Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
* fix using FSEEK_END with SeekableHttpStream to get file sizeRobin Appelman2022-09-151-21/+60
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* handle errors from hash_finalRobin Appelman2022-09-021-2/+7
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* handle cases where the hash context gets cleaned up before the hash wrapperRobin Appelman2022-08-311-1/+5
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* handle stream wrappers in SeekableHttpStreamRobin Appelman2022-06-081-0/+13
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Save encrypted files in binary formatplumbeo2022-05-041-1/+1
| | | | | | | | | | | | | Default to the more space-efficient binary encoding for newly encrypted files instead of the traditional base64 encoding, eliminating the 33% overhead. The new option 'encryption.use_legacy_encoding' allows to force the legacy encoding format if needed. Files encoded in the old format remain readable. Based on https://github.com/owncloud/encryption/pull/224 and https://github.com/owncloud/core/pull/38249 by karakayasemi. Signed-off-by: plumbeo <plumbeo@users.noreply.github.com>
* Support seeking also from the end of file on S3 storagePauli Järvinen2021-09-111-1/+10
| | | | | | | | The PR https://github.com/nextcloud/server/pull/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>
* Unregister enc stream wrapper for any exceptionVincent Petry2021-08-261-1/+1
| | | | | | | This prevents side effects in tests by properly cleaning up even with expected exceptions. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* [3rdparty] streams-0.7.4Robin Appelman2021-06-101-1/+1
| | | | | Signed-off-by: Robin Appelman <robin@icewind.nl> Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-044-6/+2
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Bump icewind/streams from 0.7.1 to 0.7.2Christoph Wurst2020-12-292-9/+28
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update all license headers for Nextcloud 21Christoph Wurst2020-12-162-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format code to a single space around binary operatorsChristoph Wurst2020-10-051-5/+5
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Cast float to int to avoid invalid scalar argument warningMorris Jobke2020-08-181-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Update license headers for 19Christoph Wurst2020-04-292-3/+8
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Run cs:fix and fix HashWrapper codeMorris Jobke2020-04-151-1/+3
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Return hashes of uploaded content for dav uploadsRobin Appelman2020-04-131-0/+72
| | | | | | | | hashes are set in "X-Hash-MD5", "X-Hash-SHA1" and "X-Hash-SHA256" headers. these headers are set for file uploads and the MOVE request at the end of a multipart upload. Signed-off-by: Robin Appelman <robin@icewind.nl>
* Add visibility to all methods and position of static keywordChristoph Wurst2020-04-101-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-102-16/+7
| | | | | | | | | | | | | | | To continue this formatting madness, here's a tiny patch that adds unified formatting for control structures like if and loops as well as classes, their methods and anonymous functions. This basically forces the constructs to start on the same line. This is not exactly what PSR2 wants, but I think we can have a few exceptions with "our" style. The starting of braces on the same line is pracrically standard for our code. This also removes and empty lines from method/function bodies at the beginning and end. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use elseif instead of else ifChristoph Wurst2020-04-101-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* harden seekable http stream a bit against failuresRobin Appelman2020-04-091-3/+13
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* update autoloaderRobin Appelman2020-04-031-9/+7
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* add basic tests for s3 seeking and add some error handling if reopen return ↵Robin Appelman2020-04-011-8/+18
| | | | | | the wrong range Signed-off-by: Robin Appelman <robin@icewind.nl>
* make seekable s3 stream genericRobin Appelman2020-04-011-0/+174
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Update the license headers for Nextcloud 19Christoph Wurst2020-03-312-0/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use the short array syntax, everywhereChristoph Wurst2020-03-262-10/+10
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update license headersChristoph Wurst2019-12-052-2/+5
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update Encryption.phpmartink-p2019-06-171-7/+9
| | | | Signed-off-by: martink-p <47943787+martink-p@users.noreply.github.com>
* Update Encryption.phpmartink-p2019-06-171-1/+7
| | | | Signed-off-by: martink-p <47943787+martink-p@users.noreply.github.com>
* Apply suggestions from code reviewmartink-p2019-06-171-5/+5
| | | | | Co-Authored-By: Daniel Kesselberg <mail@danielkesselberg.de> Signed-off-by: martink-p <47943787+martink-p@users.noreply.github.com>
* Update Encryption.phpmartink-p2019-06-171-2/+19
| | | | Signed-off-by: martink-p <47943787+martink-p@users.noreply.github.com>
* Use CountWrapper instead of almost identical CountReadStreamRoeland Jago Douma2019-02-151-65/+0
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* extend storage api to allow directly writing a stream to storageRobin Appelman2018-10-311-0/+65
| | | | | | | | | | | this removes the need for temporary storages with some external storage backends. The new method is added to a separate interface to maintain compatibility with storage backends implementing the storage interface directly (without inheriting common) Currently the interface is implemented for objectstorage based storages and local storage and used by webdav uploads Signed-off-by: Robin Appelman <robin@icewind.nl>
* make file cache updates more robustBjoern Schiessle2018-07-311-2/+17
| | | | | | only update the encrypted version after the write operation is finished and the stream is closed Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* Use better way to determine stream type in encryption stream wrapperRobin Appelman2018-05-011-3/+3
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Use ::class statement instead of stringMorris Jobke2018-01-291-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Remove unneeded semicolon and parenthesesMorris Jobke2018-01-261-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Update license headersMorris Jobke2017-11-061-0/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* only collect detailed access list if it is really neededBjoern Schiessle2017-07-061-1/+4
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* replace close:// streamwrapper with CallBackWrapperRobin Appelman2017-01-061-119/+0
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #2934 from nextcloud/quota-stream-non-globalRoeland Jago Douma2017-01-061-74/+20
|\ | | | | remove the need to register the quota streamwrapper globally
| * remove the need to register the quota streamwrapper globallyRobin Appelman2017-01-041-74/+20
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>