Commit Graph

33 Commits (jtr/fix-public-exceptions-http-codes)

Author SHA1 Message Date
Carl Schwan bef3996c3e fix(preview): Make version column a string
And move it to a different table so that we don't have to pay the
storage cost when not using it (most of the times).

Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-10-08 14:07:06 +07:00
Carl Schwan 66f50bd585 refactor(preview): Use same mimetype ids as filecache
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-10-06 13:37:15 +07:00
Carl Schwan bd001c9524 refactor: Use Override annotation in new preview code
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-10-06 13:37:15 +07:00
Carl Schwan 58023782b6 feat(preview): Store original file mimetype in preview table
Allow to quickly query all the files from a specific mimetype like in
the ResetRenderedTexts command.

Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-10-06 13:37:15 +07:00
Carl Schwan 324b54b863 refactor(preview): Cleanup the implementation of the new preview backend
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-10-06 13:37:15 +07:00
Carl Schwan ce02a5b27c refactor: Port away from search
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-10-01 16:32:22 +07:00
provokateurin 82fb8f8508
refactor: Extend rector to core/
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-05-15 00:16:54 +07:00
dependabot[bot] bb598c8451
chore(deps): Bump nextcloud/coding-standard in /vendor-bin/cs-fixer
Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard) from 1.3.1 to 1.3.2.
- [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/v1.3.1...v1.3.2)

---
updated-dependencies:
- dependency-name: nextcloud/coding-standard
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-10-19 07:57:35 +07:00
Git'Fellow c254855222 chore(db): Correctly apply query types
fix: psalm

fix: error

fix: add batch

fix: fatal error

fix: add batch

chore: add batch

chore: add batch

fix: psalm

fix: typo

fix: psalm

fix: return bool

fix: revert Manager
2024-10-17 09:21:07 +07:00
Kate 10d1c3c29f
Merge pull request #48537 from nextcloud/add-command-to-cleanup-preview 2024-10-14 08:57:00 +07:00
Joas Schilling c109ae9437
ci: Fix psalm by typing the QuestionHelper
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-10-07 12:11:27 +07:00
Thomas Citharel fe0f89c237
feat(preview): add command to cleanup preview folder
When changing preview parameters (size, format, …), one can simply delete the preview folder and run
files:scan-app-data in order to retrigger updated preview recreation because files are absent.

However, that's not possible when using ObjectStorage as primary storage, as there's no concept of
"preview folder".

This command allows to simply delete and recreate the preview folder properly from
Nextcloud, so that the abstraction levels handle all the subfolder & file deleting part.

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2024-10-03 13:41:32 +07:00
Daniel Kesselberg af6de04e9e
style: update codestyle for coding-standard 1.2.3
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2024-08-25 19:34:58 +07:00
Andy Scherzinger 5c49a54801
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-26 20:05:04 +07:00
Côme Chilliet 672923f0a6
fix: Fix newly spotted psalm issues, add exhaustive typed magic properties for LDAP classes
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-30 09:23:58 +07:00
Robin Appelman e7a7b4a401 perf: switch places that always use the first getById result to getFirstNodeById
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-03-04 13:57:31 +07:00
Joas Schilling aa5f037af7
chore: apply changes from Nextcloud coding standards 1.1.1
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2023-11-23 10:36:13 +07:00
Faraz Samapoor c0a5bdea5e Uses PHP8's constructor property promotion.
in core/Command/Info, /Integrity, and /Preview classes.

Signed-off-by: Faraz Samapoor <fsa@adlas.at>
2023-06-20 09:30:21 +07:00
Robin Appelman 013eedabbd
add command to generate a preview for a file
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-04-03 17:30:57 +07:00
sodimel 5e18ffa89d FIX: This fill finish -> This will finish
Signed-off-by: sodimel <corentin@244466666.xyz>
2023-01-26 21:05:01 +07:00
Côme Chilliet 90b955b1e9
Attempt to fix errors in Repair command tests
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-01-20 11:22:09 +07:00
Carl Schwan b70c6a128f Update core to PHP 7.4 standard
- Typed properties
- Port to LoggerInterface

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-05-20 22:18:06 +07:00
John Molakvoæ 5a766ef004
Allow to delete non-migrated previews instead of moving them
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2021-12-09 17:34:45 +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
Daniel Calviño Sánchez 9f96a47125 Add OCC command to reset rendered texts
The command is meant to be used when the fonts used to render texts
("core/fonts/NotoSans-Regular.ttf" and "core/fonts/NotoSans-Bold.ttf")
are changed (for example, to add support for other scripts). The avatar
and text file previews will be removed, so they will be generated again
with the updated font when needed.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2021-03-01 20:54:43 +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
Christoph Wurst d9015a8c94
Format code to a single space around binary operators
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-05 20:25:24 +07:00
Morris Jobke 24744dcaec
Migrate verbose messages to inline syntax of writeln()
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-09-17 16:30:33 +07:00
Morris Jobke 617b3f79fa
Show lock messages only in verbose mode
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-09-17 16:30:11 +07:00
Morris Jobke faab3e733b
Allow to run occ preview:repair in parallel
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-09-17 16:03:34 +07:00
Christoph Wurst 2a054e6c04
Update the license headers for Nextcloud 20
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-08-24 14:54:25 +07:00
Morris Jobke 545f806666
Use array_filter instead
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-07 10:42:09 +07:00
Morris Jobke d8734b3b93
Add occ preview:migrate to migrate previews from the old flat structure to a subfolder structure
* `php occ preview:repair` - a preview migration tool that moves existing previews into the new location introduced with #19214
* moves `appdata_INSTANCEID/previews/FILEID` to `appdata_INSTANCEID/previews/0/5/8/4/c/e/5/FILEID`
* migration tool can be stopped during migration via `CTRL+C` - it then finishes the current folder (with the previews of one file) and stops gracefully
* if a PHP memory limit is set in the `php.ini` then it will stop automatically once it has less than 25 MiB memory left (this is to avoid hard crashes in the middle of a migration)
* the tool can be used during operation - possible drawbacks:
    * there is the chance of a race condition that a new preview is generated in the moment the folder is already migrated away - so the old folder with the newly cached preview is deleted and one cached preview needs to be re-generated
    * there is the chance of a race condition during access of a preview while it is migrated to the other folder - then no preview can be shown and results in a 404 (as of now this is an accepted risk)

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-06 22:05:46 +07:00