Robin Appelman
b9b8db6176
fix: log error when writing stream to dav file
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-30 13:16:46 +07:00
Ferdinand Thiessen
01db539d0a
chore: move streamCopy implementation from `OC_Helper` to `OCP\Files`
...
The function was already there but called the legacy version.
So moved the implementation and migrated all usages of it.
Sadly the interface was slightly different so adjusted it to be
compatible with both legacy and the OCP one.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-05-16 13:03:05 +07:00
Ferdinand Thiessen
b4255a9652
fix(dav): allow uploading of files with long filenames
...
A filename must be less or equal 255 characters, but when adding the
`.part` and `.ocfiletransfer` extensions we might overflow this limit.
So we should also use filename hashes for uploading when the file has a
long filename, similar like when we are uploading to the user storage
directly.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-04-22 11:09:25 +07:00
Ferdinand Thiessen
6141ab1da6
refactor(dav): simplify length header handling
...
Reduce nesting and drop duplicated sections.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-04-22 11:09:05 +07:00
Ferdinand Thiessen
845693582f
fix(dav): Handle end of stream in `File::put`
...
If the stream is aborted and the callback wrapper returns false (or
null as it happened in some cases), we should not try to write to the
storage but abort the operation.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-02-18 16:41:10 +07:00
Côme Chilliet
64863c9d46
chore: Apply new rector configuration to apps folder
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-02-13 11:46:42 +07:00
Robin Appelman
ca241baac0
fix: log which file cannot be opened
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-12-04 18:50:47 +07:00
provokateurin
381077028a
refactor(apps): Use constructor property promotion when possible
...
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-10-21 12:37:59 +07:00
Côme Chilliet
1580c8612b
chore(apps): Apply new rector configuration to autouse classes
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-10-15 10:40:25 +07:00
Côme Chilliet
1a4978c4ea
chore: Apply rector configuration to apps folder
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-09-20 17:51:00 +07:00
Côme Chilliet
801733e523
fix: Remove OCP\Files\Storage interface deprecated since version 9
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-09-16 18:10:48 +07:00
Robin Appelman
957a00b9de
chore: remove chunking-v1
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-06-19 16:57:42 +07:00
Andy Scherzinger
9d4b944098
chore: Add SPDX header
...
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-27 20:11:22 +07:00
Côme Chilliet
d2de3e9981
fix: Fix incorrect phpdoc typing in dav app
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-30 09:24:00 +07:00
Côme Chilliet
ec5133b739
fix: Apply new coding standard to all files
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-02 14:16:21 +07:00
Louis Chemineau
d3a313f192
Support getting and setting metadata in DAV requests
...
Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-11-08 16:23:53 +07:00
Robin Appelman
8966f7fbf2
reuse l10n and request in dav folder listing
...
instead of having to query those once for every node
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-09-04 14:06:54 +07:00
Côme Chilliet
6034cc6893
Make sure to never trigger files hooks on a null path
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-05-04 17:55:09 +07:00
Joas Schilling
98ed72b3ed
Revert "fix(performance): Do not set up filesystem on every call"
2023-02-21 07:36:43 +07:00
Anna Larch
5d4efb4d5f
Do not set up filesystem on every call
...
Also remove old Oc_FileChunking logis that produced GC- collectable chunks
Signed-off-by: Anna Larch <anna@nextcloud.com>
2023-02-17 19:18:37 +07:00
Côme Chilliet
028c225d96
Fix psalm errors
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-02-07 11:23:32 +07:00
Côme Chilliet
a372564850
Fix psalm spotted errors with new requirements
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-01-02 15:02:28 +07:00
Maxence Lange
cc639a8877
compare cached filesize on download
...
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2022-12-01 15:42:15 +07:00
Carl Schwan
458c2fa297
Remove OCP\App and OCP\BackgroundJob
...
Both deprecated since NC 23
IAppManager is the replacement for OCP\App unfortunately it can't be
dependency injected in classes used by the installed otherwise the
database connection is initialised too early
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-08-01 09:46:40 +07:00
Carl Schwan
1b426eda44
Make X-HAS-{MD5/SHA256} opt-in
...
This is not always needed and slow down the upload
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-06-01 10:59:04 +07:00
Côme Chilliet
e2531f8503
Migrate dav application from ILogger to LoggerInterface
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-05-02 10:52:43 +07:00
Carl Schwan
7817845538
Add a metadata service to store file metadata
...
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-04-13 14:06:29 +07:00
Robin Appelman
9b1abd6fac
save filesystem node in dav node
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-06 14:40:31 +07:00
Robin Appelman
ff666e648a
Add dav plugin to trigger recalculating of checksums
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-31 07:44:13 +07:00
Robin Appelman
8b22a463e9
Merge pull request #31266 from nextcloud/root-setup-mountprovider
...
move root mount setup to mountproviders
2022-03-04 13:44:05 +07:00
Christopher Ng
67ec9813e3
Make Sabre File exception messages translatable
...
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2022-03-01 23:29:33 +07:00
Robin Appelman
ec15020777
also handle expired pre-write shared lock on dav upload when not using part files
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-02-25 16:33:27 +07:00
Louis Chemineau
bc2c02f451
Wrap S3 multipart upload exception
...
Signed-off-by: Louis Chemineau <louis@chmn.me>
2022-02-16 14:56:14 +07:00
John Molakvoæ
d6a26b2536
Revert "add dav plugin to trigger recalculating of checksums"
2021-11-01 11:26:17 +07:00
Robin Appelman
fd5e11a81a
Add dav plugin to trigger recalculating of checksums
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-08-23 15:38:58 +07:00
John Molakvoæ (skjnldsv)
215aef3cbd
Update php licenses
...
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +07:00
Christoph Wurst
8152189b09
Only write checksum if we have a valid file info
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-03-22 21:11:07 +07:00
dependabot-preview[bot]
eb502c02ff
Bump nextcloud/coding-standard from 0.3.0 to 0.5.0
...
Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard ) from 0.3.0 to 0.5.0.
- [Release notes](https://github.com/nextcloud/coding-standard/releases )
- [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md )
- [Commits](https://github.com/nextcloud/coding-standard/compare/v0.3.0...v0.5.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-02-18 13:31:24 +07:00
Christoph Wurst
73c7d0dc81
Bump icewind/streams from 0.7.1 to 0.7.2
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-29 09:07:36 +07:00
Christoph Wurst
d89a75be0b
Update all license headers for Nextcloud 21
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-16 18:48:22 +07:00
Julius Härtl
1dddf6adc7
Properly catch exception from writing to stream when copying a file
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-09-10 09:03:53 +07:00
Christoph Wurst
1f7f93a695
Update license headers for Nextcloud 20 (again)
...
There are still lots of outdated headers, so time for another round of
updates.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-09-07 14:37:44 +07:00
Julius Härtl
4cf29e598d
Do not keep the part file if the forbidden exception has retry set to false
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-09-03 11:00:24 +07:00
Robin Appelman
57403c7020
dont set headers for cli
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-04-13 12:57:29 +07:00
Robin Appelman
c2677682c4
Return hashes of uploaded content for dav uploads
...
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>
2020-04-13 12:57:27 +07:00
Christoph Wurst
caff1023ea
Format control structures, classes, methods and function
...
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>
2020-04-10 14:19:56 +07:00
Christoph Wurst
14c996d982
Use elseif instead of else if
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 10:35:09 +07:00
Christoph Wurst
42625a46be
Remove spaces after method or function call
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 16:05:56 +07:00
Christoph Wurst
1a9330cd69
Update the license headers for Nextcloud 19
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-31 14:52:54 +07:00
Christoph Wurst
b80ebc9674
Use the short array syntax, everywhere
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-26 16:34:56 +07:00