nextcloud/lib/private
Daniel Kesselberg b5241d5220
feat: allow multiple libreoffice invocations
LibreOffice only allows one invocation per user profile.[^1]

The office provider set the user profile to /tmp/owncloud-instanceid and therefore only one invocation per instance is allowed. This was introduced a while ago, yet it's unclear if this was intentionally or just a side effect.[^2]

The limitation on one invocation leads to the situation that the preview generation only works for a couple of files if you upload a whole folder of emf or word files.

This commit removes the limitation by using a new user profile for each preview. That's done by using instance id plus file id as postfix for getTemporaryFolder.

This has some drawbacks:

- Overload protection: If you upload 100 emf files, you may end up with 100 LibreOffice invocations. Though, you can use preview_concurrency_new to limit the number of previews that can be generated concurrently when php-sysvsem is available.
- New profile: I assume it takes a few bits to generate a fresh LibreOffice user profile. It appears that there is no way to ask LibreOffice to not create a profile and just work with the defaults. The profile will be cleaned after use by our temp manager.
- Remove the configuration option preview_office_cl_parameters:  This is not strictly necessary yet, but if you set the configuration option, the generated path for the user profile is also missing. The configuration option is not well documented (e.g., it's unclear that the last option needs to be --outdir) and actually, there should be no reason to change it after all.

[^1]: https://wiki.documentfoundation.org/UserProfile
[^2]: https://github.com/owncloud/core/pull/9784

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2023-11-13 21:46:31 +01:00
..
Accounts fix(phonenumber): Use the newly introduced API to limit 3rdparty lib usage 2023-09-25 15:54:21 +02:00
Activity chore: Replace \OC::$server->query with \OCP\Server::get in /lib 2023-07-06 15:21:22 +02:00
App feat(NavigationManager): Always sort the default app first 2023-10-19 22:04:20 +02:00
AppFramework feat(dependencyinjection): Allow optional (nullable) services 2023-11-03 11:53:43 +01:00
Archive Strong type filesize related methods to ease 32bits problem findings 2023-02-07 11:23:28 +01:00
Authentication fix: Show error message when CSRF check fails at login 2023-11-08 15:18:34 +01:00
Avatar Fixes psalm errors: RedundantCondition and TypeDoesNotContainNull. 2023-06-27 21:21:21 +03:30
BackgroundJob fix(JobList#hasReservedJob): Break tie when multiple jobs are reserved 2023-11-06 10:47:40 +01:00
Broadcast/Events composer run cs:fix 2023-01-20 11:45:08 +01:00
Cache Refactors "strpos" calls in lib/private to improve code readability. 2023-05-15 15:17:19 +03:30
Calendar fix(CalDAV): Check if the vObject exists before attempting any operations 2023-08-28 14:19:54 +02:00
Collaboration Refactors lib/private/Collaboration. 2023-10-03 09:17:10 +03:30
Command chore: rename serializedClosure to argument to align with parent class 2023-09-30 22:46:32 +02:00
Comments fix(comments): Use provided offset in best effort when loading comments 2023-09-18 20:09:32 +02:00
Console fix(install): Make installing more verbose 2023-11-03 15:44:46 +01:00
Contacts/ContactsMenu feat(contactsmenu): Sort by user status 2023-11-08 21:53:35 +01:00
Dashboard Fix Dashboard IManager getWidgets return annotation 2023-09-20 17:41:37 +02:00
DB fix(install): Make installing more verbose 2023-11-03 15:44:46 +01:00
Diagnostics composer run cs:fix 2023-01-20 11:45:08 +01:00
DirectEditing feat(directediting): Allow opening by file id 2023-02-20 12:16:34 +01:00
Encryption extend fix-key-location to handle cases from broken cross-storage moves 2023-08-31 19:46:47 +02:00
EventDispatcher chore!: Remove legacy SymfonyAdapter 2023-07-28 14:11:22 +02:00
Federation ocm controller 2023-09-20 08:23:45 -01:00
Files feat(files): Allow advanced search for files 2023-11-10 09:21:16 +01:00
FilesMetadata Support getting and setting metadata in DAV requests 2023-11-08 16:23:53 +01:00
FullTextSearch composer run cs:fix 2023-01-20 11:45:08 +01:00
GlobalScale Use typed version of IConfig::getSystemValue as much as possible 2023-04-05 12:50:08 +02:00
Group Merge pull request #38425 from nextcloud/feat/ocp/strict-igroup 2023-11-02 11:07:12 +01:00
Hooks composer run cs:fix 2023-01-20 11:45:08 +01:00
Http test: add tests for dns pin middleware 2023-09-12 14:04:23 +02:00
IntegrityCheck Refactors "strpos" calls in lib/private to improve code readability. 2023-05-15 15:17:19 +03:30
KnownUser Add type hints for mappers 2023-04-07 09:49:42 +02:00
L10N Update lib/private/L10N/Factory.php 2023-10-18 02:33:54 +02:00
LDAP
legacy Merge pull request #39852 from nextcloud/pragmaHeader 2023-10-18 03:30:21 +02:00
Lock Refactors lib/private/Lock. 2023-09-26 10:48:17 +03:30
Lockdown Respect OCP interface in private classes 2023-02-07 11:23:35 +01:00
Log Refactors lib/private/Log. 2023-06-28 09:29:45 +03:30
Mail Adds same object return annotations. 2023-06-27 10:45:39 +02:00
Memcache feat: Add factory method for in-memory caches 2023-10-11 13:37:22 +02:00
Migration Merge pull request #39109 from fsamapoor/refactor_lib_private_metadata_migration_net 2023-11-07 20:47:39 +01:00
Net Refactors Metadata, Migration, and Net. 2023-11-07 09:43:40 +03:30
Notification composer run cs:fix 2023-01-20 11:45:08 +01:00
OCM feat(OCM): Dispatch an event so apps can register resources 2023-10-13 08:46:28 +02:00
OCS feat(ocp): More specific type for ICapabilities::getCapabilities 2023-07-03 10:03:45 +02:00
Preview feat: allow multiple libreoffice invocations 2023-11-13 21:46:31 +01:00
Profile fix(3rdparty): Don't use indirect dependency "Safe/" for functions 2023-10-23 15:25:14 +02:00
Profiler Refactors "strpos" calls in lib/private to improve code readability. 2023-05-15 15:17:19 +03:30
Remote Convert isset ternary to null coalescing operator 2023-09-28 17:44:19 +03:30
Repair feat: add preview provider for emf files based on office 2023-11-13 12:35:54 +01:00
RichObjectStrings composer run cs:fix 2023-01-20 11:45:08 +01:00
Route Refactor "substr" calls to improve code readability 2023-07-07 04:54:20 +03:30
Search feat(search): Allow multiple search terms in UnifiedController 2023-11-10 09:21:16 +01:00
Security Simplify IP address normalizer with IP masks 2023-11-08 11:55:07 +01:00
Session fix(session): Do not log fresh/empty session as error 2023-11-07 09:13:48 +01:00
Settings Add type hints for mappers 2023-04-07 09:49:42 +02:00
Setup fix(install): Make installing more verbose 2023-11-03 15:44:46 +01:00
SetupCheck Add $name property in SetupResult and improve API 2023-11-07 14:15:47 +01:00
Share Refactors "strpos" calls in lib/private to improve code readability. 2023-05-15 15:17:19 +03:30
Share20 Convert isset ternary to null coalescing operator 2023-09-28 17:44:19 +03:30
SpeechToText AI admin settings: Use config values in AI feature managers 2023-08-02 12:37:35 +02:00
Support Use typed version of IConfig::getSystemValue as much as possible 2023-04-05 12:50:08 +02:00
SystemTag Refactors lib/private/SystemTag. 2023-11-07 09:41:33 +03:30
Tagging Add type hints for mappers 2023-04-07 09:49:42 +02:00
Talk Add Talk converstation delete API 2022-10-31 11:44:39 +01:00
Template Add custom apps translation scripts and image path for consistency 2023-10-19 14:39:29 +05:30
TextProcessing feat: Add delete task API 2023-08-07 13:27:53 +02:00
TextToImage fix(TextToImage): Always set completionExpectedAt in run/schedule methods 2023-11-02 12:07:10 +01:00
Translation AI admin settings: Use config values in AI feature managers 2023-08-02 12:37:35 +02:00
Updater Print log message when version could not be got from updater server 2023-09-06 05:43:21 +02:00
User Merge pull request #41302 from zero0cool0/master 2023-11-10 16:41:01 +01:00
UserStatus composer run cs:fix 2023-01-20 11:45:08 +01:00
AllConfig.php fix mistake in db query to delete a user config value 2022-07-27 16:45:10 +02:00
AppConfig.php Convert isset ternary to null coalescing operator 2023-09-28 17:44:19 +03:30
AppScriptDependency.php
AppScriptSort.php
BinaryFinder.php Move findBinaryFinder and isFunctionEnabled away from OC_Helper 2022-08-23 19:44:04 +02:00
CapabilitiesManager.php core: Add OpenAPI spec 2023-07-13 07:24:15 +02:00
Color.php
Config.php add a check for disk_free_space in Config.php 2023-03-07 09:43:14 +00:00
ContactsManager.php Cleanup plsam issues in DB/ContactsManager and Console 2023-09-05 09:20:26 +02:00
DatabaseException.php
DatabaseSetupException.php
DateTimeFormatter.php Update lib/private/DateTimeFormatter.php 2023-09-05 21:09:16 +03:30
DateTimeZone.php
EmojiHelper.php
EventSourceFactory.php refactor: migrate OC_EventSource to dependency injection 2023-06-03 21:42:51 +02:00
ForbiddenException.php
HintException.php Fix typos in lib/private subdirectory 2022-07-27 08:52:17 -04:00
InitialStateService.php fix(initial-state): Log an error when initial-state can not be JSON encoded 2023-04-04 10:54:12 +02:00
Installer.php fix(install): Make installing more verbose 2023-11-03 15:44:46 +01:00
LargeFileHelper.php Refactors "strpos" calls in lib/private to improve code readability. 2023-05-15 15:17:19 +03:30
Log.php Add optional to add backtrace to log items 2023-07-10 15:27:31 +02:00
MemoryInfo.php Add helper to cast to int|float, fix MemoryInfo on 32bits 2023-02-07 11:23:29 +01:00
NaturalSort.php
NaturalSort_DefaultCollator.php
NavigationManager.php enh: Register profile nav entry 2023-10-26 10:30:22 -07:00
NeedsUpdateException.php
NotSquareException.php
PhoneNumberUtil.php fix(phonenumber): Improve docs by adding input details 2023-09-25 17:32:47 +02:00
PreviewManager.php feat: add preview provider for emf files based on office 2023-11-13 12:35:54 +01:00
PreviewNotAvailableException.php
RedisFactory.php Code simplification using null coalescing 2023-08-13 16:26:24 +02:00
Repair.php fix(install): Make installing more verbose 2023-11-03 15:44:46 +01:00
RepairException.php
Search.php
Server.php Support getting and setting metadata in DAV requests 2023-11-08 16:23:53 +01:00
ServerContainer.php Merge pull request #38322 from nextcloud/bugfix/noid/throw-early-app-container 2023-06-06 08:41:08 +02:00
ServerNotAvailableException.php
ServiceUnavailableException.php
Setup.php fix(install): Make installing more verbose 2023-11-03 15:44:46 +01:00
Streamer.php fix: log fopen calls when stream isn't available 2023-07-20 17:28:25 +02:00
StreamImage.php Allow empty mimeType 2022-12-04 14:51:33 +01:00
SubAdmin.php composer run cs:fix 2023-01-20 11:45:08 +01:00
SystemConfig.php fix(systemreport): Mask onlyoffice secret as sensitive 2023-09-29 16:36:19 +02:00
TagManager.php Cleanup tags and Share component 2022-09-29 15:15:28 +00:00
Tags.php Remove deprecated methods Util::writeLog and DIContainer::log 2023-09-25 10:37:12 +02:00
TemplateLayout.php Add unified search toggle in config 2023-11-10 11:27:32 +01:00
TempManager.php
Updater.php chore: Drop \OC_App::getAppVersion 2023-06-01 11:31:26 +02:00
URLGenerator.php Refactor "substr" calls to improve code readability 2023-07-07 04:54:20 +03:30