aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_versions/lib
Commit message (Collapse)AuthorAgeFilesLines
* fix(files_versions): only close stream if still open, fixing S3fix/s3-versionsFerdinand Thiessen2025-05-181-1/+7
| | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* fix(files_version): use `Storage::writeStream` instead of deprecated ↵chore/move-stream-copy-implementationFerdinand Thiessen2025-05-161-4/+16
| | | | | | `streamCopy` if possible Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* chore: move streamCopy implementation from `OC_Helper` to `OCP\Files`Ferdinand Thiessen2025-05-161-2/+5
| | | | | | | | | 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>
* Merge pull request #48560 from nextcloud/fix/migrate-encryption-away-from-hooksCôme Chilliet2025-05-141-3/+3
|\ | | | | feat(encryption): Migrate from hooks to events
| * feat(encryption): Migrate from hooks to eventsCôme Chilliet2025-05-131-3/+3
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | refactor: Apply rector refactoringschore/deps/rector-2.0provokateurin2025-05-141-1/+2
| | | | | | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* | fix(files_versions): Folder should not be hardcoedfixHardcodedVersionsFolderGit'Fellow2025-05-091-4/+8
|/ | | | Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
* Merge pull request #52369 from nextcloud/fix/files-versions-authorFerdinand Thiessen2025-04-291-1/+2
|\ | | | | fix(files_versions): wait for version to be created before setting metadata
| * fix(files_versions): wait for version to be created before setting metadatafix/files-versions-authorFerdinand Thiessen2025-04-231-1/+2
| | | | | | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* | fix(files_versions): only handle path updates when there is pathfix/files-versions-listenersFerdinand Thiessen2025-04-271-4/+12
| | | | | | | | | | | | | | | | | | `getPathForNode` can fail with null for various reasons (e.g. no owner), in this cases we need to just skip the event handling. Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de> Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com> Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* | fix(files_versions): create version if previous does not existfix/files-version-creationFerdinand Thiessen2025-04-231-2/+11
|/ | | | | | | | | | | | | | | | | | | | This issue happens reproducible if: - Versions is disabled - Upload a file - Enable versions - Upload same file unchanged - Now the error happens. Problem is that the mtime is unchanged so no version will be created on the upload, but it tries to update the last version which does not exists. Instead of "upload same file unchanged" you can also - like in the example stack trace above - use Android with an SD card with invalid mtime -> the mtime will be stripped so its always the same. Instead of disable versions the same also happens if e.g. the versions creation failed due to other issues. The solution now is to catch the exception and create if not exists. A cleaner solution would be to have a method on the versions backend like `hasVersionEntity(File $file, int $revision): bool` but this would be a breaking change or at least a feature that apps need to implement. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* feat(files_versions): Implement preview mime icon fallbackprovokateurin2025-03-271-1/+16
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* fix(files_versions): Cache previewsprovokateurin2025-03-271-1/+3
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* Merge pull request #50990 from AIlkiv/refactor/version-rollback-to-eventStephan Orbaugh2025-02-274-8/+82
|\ | | | | refactor: move version rollback hook to event
| * refactor: move version rollback hook to eventailkiv2025-02-254-8/+82
| | | | | | | | Signed-off-by: ailkiv <a.ilkiv.ye@gmail.com>
* | Merge pull request #50903 from ↵Louis2025-02-252-1/+23
|\ \ | | | | | | | | | | | | nextcloud/artonge/fix/min_age_rentention_files_versions fix(files_versions): Do not expire versions newer than min age
| * | fix(files_versions): Do not expire versions newer than min ageartonge/fix/min_age_rentention_files_versionsLouis Chemineau2025-02-192-1/+23
| |/ | | | | | | | | | | | | | | The auto expire logic does not take into account the min retention age set by the admin. So versions were eagerly deleted. Fix https://github.com/nextcloud/server/issues/19791 Signed-off-by: Louis Chemineau <louis@chmn.me>
* / Fix: NotFoundException for anonymous usersbugfix/fix-not-found-exception-for-anonymous-usersKostiantyn Miakshyn2025-02-211-1/+5
|/ | | | Signed-off-by: Kostiantyn Miakshyn <molodchick@gmail.com>
* chore: Apply new rector configuration to apps folderCôme Chilliet2025-02-134-25/+28
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: Replace getInstalledApps calls with getEnabledAppsfix/clarify-app-manager-methodsCôme Chilliet2025-02-131-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix(files_versions): Update `unencrypted_size` during rollbackartonge/fix/restoring_encrypted_versionLouis Chemineau2025-01-281-1/+2
| | | | | | This prevent restored version of encrypted files from having a wrong reported size. This was blocking download. Signed-off-by: Louis Chemineau <louis@chmn.me>
* chore(files_versions): Remove unused $node variableLouis Chemineau2025-01-281-2/+0
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* refactor(OpenAPI): Adjust scopes to match previous behaviorprovokateurin2025-01-061-0/+2
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* fix: Correctly create NonExistingFolder during copyLouis Chemineau2024-12-041-1/+2
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* fix(OpenAPI): Adjust array syntax to avoid ambiguitiesfix/openapi/array-syntaxprovokateurin2024-11-051-1/+1
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* refactor(apps): Use constructor property promotion when possibleprovokateurin2024-10-2110-116/+41
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* chore(apps): Apply new rector configuration to autouse classesCôme Chilliet2024-10-154-9/+15
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* chore: Apply rector configuration to apps folderCôme Chilliet2024-09-203-3/+3
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* chore(deps): Update nextcloud/coding-standard to v1.3.1provokateurin2024-09-195-22/+22
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* fix(Files): Handle getOwner() returning falsefix/storage/get-owner-falseprovokateurin2024-09-171-0/+4
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* style: update codestyle for coding-standard 1.2.3Daniel Kesselberg2024-08-259-36/+36
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Merge pull request #46887 from nextcloud/fix/versions-catch-insertion-errorJohn Molakvoæ2024-08-141-1/+21
|\
| * fix(files_versions): Catch constraint error on version insertionCôme Chilliet2024-07-301-1/+21
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Merge pull request #46813 from ↵Kate2024-08-141-3/+4
|\ \ | | | | | | | | | nextcloud/refactor/files_versions/security-attributes
| * | refactor(files_versions): Replace security annotations with respective ↵provokateurin2024-07-271-3/+4
| |/ | | | | | | | | | | attributes Signed-off-by: provokateurin <kate@provokateurin.de>
* | feat: Make `ISharedStorage` public API and reuse where possibleFerdinand Thiessen2024-08-121-4/+3
| | | | | | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* | Merge pull request #46710 from ↵Stephan Orbaugh2024-08-061-1/+1
|\ \ | |/ |/| | | | | nextcloud/artonge/fix/use_timestamp_instead_of_revision fix: Use timestamp instead of revision id in files_versions metadata API
| * fix: Use timestamp instead of revision id in files_versions metadata APILouis Chemineau2024-07-241-1/+1
| | | | | | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* | fix: add a try and catch for delete versioninggreta2024-07-251-2/+7
| | | | | | | | Signed-off-by: greta <gretadoci@gmail.com>
* | fix(files_versions): avoid unintentional skipping of expirationcarhe2024-07-251-1/+1
|/ | | Signed-off-by: carhe <carstenherrmann@web.de>
* chore: Add SPDX headerAndy Scherzinger2024-06-0239-785/+89
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* feat(files_versions): Add listener and interfaces to allow versions ↵Louis Chemineau2024-03-269-2/+325
| | | | | | migration across storages Signed-off-by: Louis Chemineau <louis@chmn.me>
* Merge pull request #44362 from ↵Louis2024-03-221-6/+14
|\ | | | | | | | | nextcloud/artonge/feat/check_permissions_of_all_nodes_for_versions Check permissions of all accessible file for versions
| * Merge pull request #44297 from nextcloud/fix/forbid-tagging-readonly-filesLouis Chemineau2024-03-211-6/+14
| | | | | | | | | | | | Forbid tagging readonly files Signed-off-by: Louis Chemineau <louis@chmn.me>
* | refactor(files_versions): Rename MetadataFileEvents to VersionAuthorListenerLouis Chemineau2024-03-212-4/+4
|/ | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* Merge pull request #43613 from nextcloud/version-owner-fallbackJohn Molakvoæ2024-03-161-0/+10
|\
| * fix: fallback from guessing the owner from path in versioningRobin Appelman2024-03-071-0/+10
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | chore(files_versions): Use new metadata API for versionsLouis Chemineau2024-03-139-183/+53
| | | | | | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* | fix: fixed stylistic errorsEduardo Morales2024-03-114-6/+6
| | | | | | | | Signed-off-by: Eduardo Morales <emoral435@gmail.com>
* | fix(files_version): deprecated INameableVersionEduardo Morales2024-03-118-13/+16
| | | | | | | | Signed-off-by: Eduardo Morales <emoral435@gmail.com>