diff options
27 files changed, 115 insertions, 34 deletions
diff --git a/apps/dav/lib/Connector/Sabre/File.php b/apps/dav/lib/Connector/Sabre/File.php index 94632b265db..3a871b06259 100644 --- a/apps/dav/lib/Connector/Sabre/File.php +++ b/apps/dav/lib/Connector/Sabre/File.php @@ -45,11 +45,11 @@ use OC\Files\Stream\HashWrapper; use OC\Files\View; use OC\Metadata\FileMetadata; use OCA\DAV\AppInfo\Application; +use OCA\DAV\Connector\Sabre\Exception\BadGateway; use OCA\DAV\Connector\Sabre\Exception\EntityTooLarge; use OCA\DAV\Connector\Sabre\Exception\FileLocked; use OCA\DAV\Connector\Sabre\Exception\Forbidden as DAVForbiddenException; use OCA\DAV\Connector\Sabre\Exception\UnsupportedMediaType; -use OCA\DAV\Connector\Sabre\Exception\BadGateway; use OCP\Encryption\Exceptions\GenericEncryptionException; use OCP\Files\EntityTooLargeException; use OCP\Files\FileInfo; @@ -491,9 +491,21 @@ class File extends Node implements IFile { } catch (\Exception $e) { $this->convertToSabreException($e); } + if ($res === false) { throw new ServiceUnavailable($this->l10n->t('Could not open file')); } + + // comparing current file size with the one in DB + // if different, fix DB and refresh cache. + if ($this->getSize() !== $this->fileView->filesize($this->getPath())) { + $logger = \OC::$server->get(LoggerInterface::class); + $logger->warning('fixing cached size of file id=' . $this->getId()); + + $this->getFileInfo()->getStorage()->getUpdater()->update($this->getFileInfo()->getInternalPath()); + $this->refreshInfo(); + } + return $res; } catch (GenericEncryptionException $e) { // returning 503 will allow retry of the operation at a later point in time diff --git a/apps/dav/lib/Server.php b/apps/dav/lib/Server.php index f98dba22925..437a425fcd3 100644 --- a/apps/dav/lib/Server.php +++ b/apps/dav/lib/Server.php @@ -1,6 +1,7 @@ <?php /** * @copyright Copyright (c) 2016, ownCloud, Inc. + * @copyright Copyright (c) 2022 Informatyka Boguslawski sp. z o.o. sp.k., http://www.ib.pl/ * * @author Arthur Schiwon <blizzz@arthur-schiwon.de> * @author Bjoern Schiessle <bjoern@schiessle.org> @@ -177,7 +178,9 @@ class Server { $this->server->addPlugin(\OC::$server->get(\OCA\DAV\CalDAV\Trashbin\Plugin::class)); $this->server->addPlugin(new \OCA\DAV\CalDAV\WebcalCaching\Plugin($request)); - $this->server->addPlugin(new \Sabre\CalDAV\Subscriptions\Plugin()); + if (\OC::$server->getConfig()->getAppValue('dav', 'allow_calendar_link_subscriptions', 'yes') === 'yes') { + $this->server->addPlugin(new \Sabre\CalDAV\Subscriptions\Plugin()); + } $this->server->addPlugin(new \Sabre\CalDAV\Notifications\Plugin()); $this->server->addPlugin(new DAV\Sharing\Plugin($authBackend, \OC::$server->getRequest(), \OC::$server->getConfig())); diff --git a/apps/files/css/merged.css b/apps/files/css/merged.css index a46cf1cd722..3b595813654 100644 --- a/apps/files/css/merged.css +++ b/apps/files/css/merged.css @@ -1541,7 +1541,7 @@ table.dragshadow td.size { .oc-dialog .fileexists .original, .oc-dialog .fileexists .replacement { float: left; - width: 225px; + width: 50%; } .oc-dialog .fileexists .conflicts { diff --git a/apps/files/css/upload.css b/apps/files/css/upload.css index 1ab561b2156..efe99b4129f 100644 --- a/apps/files/css/upload.css +++ b/apps/files/css/upload.css @@ -187,7 +187,7 @@ .oc-dialog .fileexists .original, .oc-dialog .fileexists .replacement { float: left; - width: 225px; + width: 50%; } .oc-dialog .fileexists .conflicts { diff --git a/apps/files/css/upload.scss b/apps/files/css/upload.scss index 3706bb5323f..88207e0a844 100644 --- a/apps/files/css/upload.scss +++ b/apps/files/css/upload.scss @@ -156,7 +156,7 @@ .oc-dialog .fileexists .original, .oc-dialog .fileexists .replacement { float: left; - width: 225px; + width: 50%; } .oc-dialog .fileexists .conflicts { overflow-y: auto; diff --git a/apps/files_versions/l10n/fr.js b/apps/files_versions/l10n/fr.js index 6c5ab5d1fcd..5a75ab87d02 100644 --- a/apps/files_versions/l10n/fr.js +++ b/apps/files_versions/l10n/fr.js @@ -4,6 +4,11 @@ OC.L10N.register( "Versions" : "Versions", "This application automatically maintains older versions of files that are changed." : "Cette application conserve automatiquement des anciennes versions de fichiers qui ont été modifiés.", "This application automatically maintains older versions of files that are changed. When enabled, a hidden versions folder is provisioned in every user's directory and is used to store old file versions. A user can revert to an older version through the web interface at any time, with the replaced file becoming a version. The app automatically manages the versions folder to ensure the user does not run out of Quota because of versions.\n\t\tIn addition to the expiry of versions, the versions app makes certain never to use more than 50% of the user's currently available free space. If stored versions exceed this limit, the app will delete the oldest versions first until it meets this limit. More information is available in the Versions documentation." : "Cette application maintient automatiquement les anciennes versions des fichiers qui sont modifiés. Lorsqu'elle est activée, un dossier de versions cachées est provisionné dans le répertoire de chaque utilisateur et est utilisé pour stocker les anciennes versions de fichiers. Un utilisateur peut à tout moment revenir à une ancienne version via l'interface Web, le fichier remplacé devenant à son tour une version. L'application gère automatiquement le dossier des versions pour s'assurer que l'utilisateur ne manque pas de place à cause des versions stockées.\n\t\tEn plus de l'expiration des versions, l'application veille à ne jamais utiliser plus de 50% de l'espace libre actuellement disponible pour l'utilisateur. Si les versions stockées dépassent cette limite, l'application supprime les versions les plus anciennes en premier jusqu'à ce qu'elle atteigne cette limite. Plus d'informations sont disponibles dans la documentation Versions.", + "Download version" : "Télécharger la version", + "Restore version" : "Restaurer la version", + "No versions yet" : "Aucune version pour l'instant", + "Version restored" : "Version restaurée", + "Could not restore version" : "Impossible de restaurer la version", "Version" : "Version", "This application automatically maintains older versions of files that are changed. When enabled, a hidden versions folder is provisioned in every user’s directory and is used to store old file versions. A user can revert to an older version through the web interface at any time, with the replaced file becoming a version. The app automatically manages the versions folder to ensure the user doesn’t run out of Quota because of versions.\n\t\tIn addition to the expiry of versions, the versions app makes certain never to use more than 50% of the user’s currently available free space. If stored versions exceed this limit, the app will delete the oldest versions first until it meets this limit. More information is available in the Versions documentation." : "Cette application maintient automatiquement les anciennes versions des fichiers qui sont modifiés. Lorsqu'elle est activée, un dossier de versions cachées est provisionné dans le répertoire de chaque utilisateur et est utilisé pour stocker les anciennes versions de fichiers. Un utilisateur peut à tout moment revenir à une ancienne version via l'interface Web, le fichier remplacé devenant à son tour une version. L'application gère automatiquement le dossier des versions pour s'assurer que l'utilisateur ne manque pas de place à cause des versions stockées.\nEn plus de l'expiration des versions, l'application veille à ne jamais utiliser plus de 50% de l'espace libre actuellement disponible pour l'utilisateur. Si les versions stockées dépassent cette limite, l'application supprime les versions les plus anciennes en premier jusqu'à ce qu'elle atteigne cette limite. Plus d'informations sont disponibles dans la documentation Versions.", "Failed to revert {file} to revision {timestamp}." : "Échec de la restauration du fichier {file} à la révision {timestamp}.", diff --git a/apps/files_versions/l10n/fr.json b/apps/files_versions/l10n/fr.json index 231f7158d27..3349c9ba550 100644 --- a/apps/files_versions/l10n/fr.json +++ b/apps/files_versions/l10n/fr.json @@ -2,6 +2,11 @@ "Versions" : "Versions", "This application automatically maintains older versions of files that are changed." : "Cette application conserve automatiquement des anciennes versions de fichiers qui ont été modifiés.", "This application automatically maintains older versions of files that are changed. When enabled, a hidden versions folder is provisioned in every user's directory and is used to store old file versions. A user can revert to an older version through the web interface at any time, with the replaced file becoming a version. The app automatically manages the versions folder to ensure the user does not run out of Quota because of versions.\n\t\tIn addition to the expiry of versions, the versions app makes certain never to use more than 50% of the user's currently available free space. If stored versions exceed this limit, the app will delete the oldest versions first until it meets this limit. More information is available in the Versions documentation." : "Cette application maintient automatiquement les anciennes versions des fichiers qui sont modifiés. Lorsqu'elle est activée, un dossier de versions cachées est provisionné dans le répertoire de chaque utilisateur et est utilisé pour stocker les anciennes versions de fichiers. Un utilisateur peut à tout moment revenir à une ancienne version via l'interface Web, le fichier remplacé devenant à son tour une version. L'application gère automatiquement le dossier des versions pour s'assurer que l'utilisateur ne manque pas de place à cause des versions stockées.\n\t\tEn plus de l'expiration des versions, l'application veille à ne jamais utiliser plus de 50% de l'espace libre actuellement disponible pour l'utilisateur. Si les versions stockées dépassent cette limite, l'application supprime les versions les plus anciennes en premier jusqu'à ce qu'elle atteigne cette limite. Plus d'informations sont disponibles dans la documentation Versions.", + "Download version" : "Télécharger la version", + "Restore version" : "Restaurer la version", + "No versions yet" : "Aucune version pour l'instant", + "Version restored" : "Version restaurée", + "Could not restore version" : "Impossible de restaurer la version", "Version" : "Version", "This application automatically maintains older versions of files that are changed. When enabled, a hidden versions folder is provisioned in every user’s directory and is used to store old file versions. A user can revert to an older version through the web interface at any time, with the replaced file becoming a version. The app automatically manages the versions folder to ensure the user doesn’t run out of Quota because of versions.\n\t\tIn addition to the expiry of versions, the versions app makes certain never to use more than 50% of the user’s currently available free space. If stored versions exceed this limit, the app will delete the oldest versions first until it meets this limit. More information is available in the Versions documentation." : "Cette application maintient automatiquement les anciennes versions des fichiers qui sont modifiés. Lorsqu'elle est activée, un dossier de versions cachées est provisionné dans le répertoire de chaque utilisateur et est utilisé pour stocker les anciennes versions de fichiers. Un utilisateur peut à tout moment revenir à une ancienne version via l'interface Web, le fichier remplacé devenant à son tour une version. L'application gère automatiquement le dossier des versions pour s'assurer que l'utilisateur ne manque pas de place à cause des versions stockées.\nEn plus de l'expiration des versions, l'application veille à ne jamais utiliser plus de 50% de l'espace libre actuellement disponible pour l'utilisateur. Si les versions stockées dépassent cette limite, l'application supprime les versions les plus anciennes en premier jusqu'à ce qu'elle atteigne cette limite. Plus d'informations sont disponibles dans la documentation Versions.", "Failed to revert {file} to revision {timestamp}." : "Échec de la restauration du fichier {file} à la révision {timestamp}.", diff --git a/apps/files_versions/l10n/sv.js b/apps/files_versions/l10n/sv.js index 601aa341c88..8b0e50cc29b 100644 --- a/apps/files_versions/l10n/sv.js +++ b/apps/files_versions/l10n/sv.js @@ -4,6 +4,11 @@ OC.L10N.register( "Versions" : "Versioner", "This application automatically maintains older versions of files that are changed." : "Den här applikationen behåller automatiskt äldre versioner av filer som ändras.", "This application automatically maintains older versions of files that are changed. When enabled, a hidden versions folder is provisioned in every user's directory and is used to store old file versions. A user can revert to an older version through the web interface at any time, with the replaced file becoming a version. The app automatically manages the versions folder to ensure the user does not run out of Quota because of versions.\n\t\tIn addition to the expiry of versions, the versions app makes certain never to use more than 50% of the user's currently available free space. If stored versions exceed this limit, the app will delete the oldest versions first until it meets this limit. More information is available in the Versions documentation." : "Denna applikation hanterar automatiskt äldre versioner av filer när de ändras. När funktionen är aktiverad tillhandahålls en dold versionsmapp i varje användares katalog som används för att lagra gamla filversioner. En användare kan när som hellst återgå till en äldre version via webbgränssnittet, när detta görs blir den ersatta filen en version. Appen hanterar automatiskt versionsmappen för att säkerställa att användaren inte får slut på sin kvot på grund av sparade versioner.\nUtöver hantering av utgångna versioner så förvissar sig appen för versionshantering att den inte använder sig av mer än 50% av användarens tillgängliga ledigt utrymme. Om lagrade versioner överskrider denna gräns, kommer appen att ta bort de äldsta versionerna först tills den återigen uppfyller denna gräns. Mer information finns i Versionsdokumentationen.", + "Download version" : "Ladda ner version", + "Restore version" : "Återställ version", + "No versions yet" : "Inga versioner än", + "Version restored" : "Version återställd", + "Could not restore version" : "Kunde inte återställa versionen", "Version" : "Version", "This application automatically maintains older versions of files that are changed. When enabled, a hidden versions folder is provisioned in every user’s directory and is used to store old file versions. A user can revert to an older version through the web interface at any time, with the replaced file becoming a version. The app automatically manages the versions folder to ensure the user doesn’t run out of Quota because of versions.\n\t\tIn addition to the expiry of versions, the versions app makes certain never to use more than 50% of the user’s currently available free space. If stored versions exceed this limit, the app will delete the oldest versions first until it meets this limit. More information is available in the Versions documentation." : "Denna applikation hanterar automatiskt äldre versioner av filer när de ändras. När funktionen är aktiverad tillhandahålls en dold versionsmapp i varje användares katalog som används för att lagra gamla filversioner. En användare kan när som hellst återgå till en äldre version via webbgränssnittet, när detta görs blir den ersatta filen en version. Appen hanterar automatiskt versionsmappen för att säkerställa att användaren inte får slut på sin kvot på grund av sparade versioner.\nUtöver hantering av utgångna versioner så förvissar sig appen för versionshantering att den inte använder sig av mer än 50% av användarens tillgängliga ledigt utrymme. Om lagrade versioner överskrider denna gräns, kommer appen att ta bort de äldsta versionerna först tills den återigen uppfyller denna gräns. Mer information finns i Versionsdokumentationen.", "Failed to revert {file} to revision {timestamp}." : "Misslyckades att återställa {file} till version {timestamp}.", diff --git a/apps/files_versions/l10n/sv.json b/apps/files_versions/l10n/sv.json index 110fcd10e13..8861a7724a2 100644 --- a/apps/files_versions/l10n/sv.json +++ b/apps/files_versions/l10n/sv.json @@ -2,6 +2,11 @@ "Versions" : "Versioner", "This application automatically maintains older versions of files that are changed." : "Den här applikationen behåller automatiskt äldre versioner av filer som ändras.", "This application automatically maintains older versions of files that are changed. When enabled, a hidden versions folder is provisioned in every user's directory and is used to store old file versions. A user can revert to an older version through the web interface at any time, with the replaced file becoming a version. The app automatically manages the versions folder to ensure the user does not run out of Quota because of versions.\n\t\tIn addition to the expiry of versions, the versions app makes certain never to use more than 50% of the user's currently available free space. If stored versions exceed this limit, the app will delete the oldest versions first until it meets this limit. More information is available in the Versions documentation." : "Denna applikation hanterar automatiskt äldre versioner av filer när de ändras. När funktionen är aktiverad tillhandahålls en dold versionsmapp i varje användares katalog som används för att lagra gamla filversioner. En användare kan när som hellst återgå till en äldre version via webbgränssnittet, när detta görs blir den ersatta filen en version. Appen hanterar automatiskt versionsmappen för att säkerställa att användaren inte får slut på sin kvot på grund av sparade versioner.\nUtöver hantering av utgångna versioner så förvissar sig appen för versionshantering att den inte använder sig av mer än 50% av användarens tillgängliga ledigt utrymme. Om lagrade versioner överskrider denna gräns, kommer appen att ta bort de äldsta versionerna först tills den återigen uppfyller denna gräns. Mer information finns i Versionsdokumentationen.", + "Download version" : "Ladda ner version", + "Restore version" : "Återställ version", + "No versions yet" : "Inga versioner än", + "Version restored" : "Version återställd", + "Could not restore version" : "Kunde inte återställa versionen", "Version" : "Version", "This application automatically maintains older versions of files that are changed. When enabled, a hidden versions folder is provisioned in every user’s directory and is used to store old file versions. A user can revert to an older version through the web interface at any time, with the replaced file becoming a version. The app automatically manages the versions folder to ensure the user doesn’t run out of Quota because of versions.\n\t\tIn addition to the expiry of versions, the versions app makes certain never to use more than 50% of the user’s currently available free space. If stored versions exceed this limit, the app will delete the oldest versions first until it meets this limit. More information is available in the Versions documentation." : "Denna applikation hanterar automatiskt äldre versioner av filer när de ändras. När funktionen är aktiverad tillhandahålls en dold versionsmapp i varje användares katalog som används för att lagra gamla filversioner. En användare kan när som hellst återgå till en äldre version via webbgränssnittet, när detta görs blir den ersatta filen en version. Appen hanterar automatiskt versionsmappen för att säkerställa att användaren inte får slut på sin kvot på grund av sparade versioner.\nUtöver hantering av utgångna versioner så förvissar sig appen för versionshantering att den inte använder sig av mer än 50% av användarens tillgängliga ledigt utrymme. Om lagrade versioner överskrider denna gräns, kommer appen att ta bort de äldsta versionerna först tills den återigen uppfyller denna gräns. Mer information finns i Versionsdokumentationen.", "Failed to revert {file} to revision {timestamp}." : "Misslyckades att återställa {file} till version {timestamp}.", diff --git a/apps/files_versions/l10n/tr.js b/apps/files_versions/l10n/tr.js index ab946298459..2b5ab9c0237 100644 --- a/apps/files_versions/l10n/tr.js +++ b/apps/files_versions/l10n/tr.js @@ -4,6 +4,11 @@ OC.L10N.register( "Versions" : "Sürümler", "This application automatically maintains older versions of files that are changed." : "Bu uygulama değiştirilen dosyaların önceki sürümlerini otomatik olarak izler ve saklar.", "This application automatically maintains older versions of files that are changed. When enabled, a hidden versions folder is provisioned in every user's directory and is used to store old file versions. A user can revert to an older version through the web interface at any time, with the replaced file becoming a version. The app automatically manages the versions folder to ensure the user does not run out of Quota because of versions.\n\t\tIn addition to the expiry of versions, the versions app makes certain never to use more than 50% of the user's currently available free space. If stored versions exceed this limit, the app will delete the oldest versions first until it meets this limit. More information is available in the Versions documentation." : "Bu uygulama değiştirilen dosyaların önceki sürümlerini otomatik olarak izler ve saklar. etkinleştirildiğinde, dosya sürümlerini saklamak için her kullanıcının klasörlerinde gizli bir versions klasörü oluşturulur. Kullanıcılar web arayüzünü kullanarak istedikleri zaman dosyalarının daha önceki sürümlerine geri dönebilirler. Uygulama versions klasörünü otomatik olarak düzenler ve önceki dosya sürümleri nedeniyle kullanıcının kotasının dolmasını engeller.\n\t\tSürümler uygulaması dosya sürümlerini belirli bir süreyle saklarken, kullanıcı depolama alanının en çok %50 oranındaki bölümünü kullanır. Depolanan sürüm dosyalarının boyutu bu sınırın üzerine çıkarsa, sınır değerine geri dönülene kadar en eski sürüm dosyaları silinir. Ayrıntılı bilgi almak için Sürümler uygulamasının belgelerine bakabilirsiniz.", + "Download version" : "Sürümü indir", + "Restore version" : "Sürümü geri yükle", + "No versions yet" : "Henüz bir sürüm yok", + "Version restored" : "Sürüm geri yüklendi", + "Could not restore version" : "Sürüm geri yüklenemedi", "Version" : "Sürüm", "This application automatically maintains older versions of files that are changed. When enabled, a hidden versions folder is provisioned in every user’s directory and is used to store old file versions. A user can revert to an older version through the web interface at any time, with the replaced file becoming a version. The app automatically manages the versions folder to ensure the user doesn’t run out of Quota because of versions.\n\t\tIn addition to the expiry of versions, the versions app makes certain never to use more than 50% of the user’s currently available free space. If stored versions exceed this limit, the app will delete the oldest versions first until it meets this limit. More information is available in the Versions documentation." : "Bu uygulama değiştirilen dosyaların önceki sürümlerini otomatik olarak izler ve saklar. etkinleştirildiğinde, dosya sürümlerini saklamak için her kullanıcının klasörlerinde gizli bir versions klasörü oluşturulur. Kullanıcılar web arayüzünü kullanarak istedikleri zaman dosyalarının daha önceki sürümlerine geri dönebilirler. Uygulama versions klasörünü otomatik olarak düzenler ve önceki dosya sürümleri nedeniyle kullanıcının kotasının dolmasını engeller.\n\t\tSürümler uygulaması dosya sürümlerini belirli bir süreyle saklarken, kullanıcı depolama alanının en çok %50 oranındaki bölümünü kullanır. Depolanan sürüm dosyalarının boyutu bu sınırın üzerine çıkarsa, sınır değerine geri dönülene kadar en eski sürüm dosyaları silinir. Ayrıntılı bilgi almak için Sürümler uygulamasının belgelerine bakabilirsiniz.", "Failed to revert {file} to revision {timestamp}." : "{file} dosyası {timestamp} sürümüne geri alınamadı.", diff --git a/apps/files_versions/l10n/tr.json b/apps/files_versions/l10n/tr.json index 9cc63e8114c..2cdfb872b26 100644 --- a/apps/files_versions/l10n/tr.json +++ b/apps/files_versions/l10n/tr.json @@ -2,6 +2,11 @@ "Versions" : "Sürümler", "This application automatically maintains older versions of files that are changed." : "Bu uygulama değiştirilen dosyaların önceki sürümlerini otomatik olarak izler ve saklar.", "This application automatically maintains older versions of files that are changed. When enabled, a hidden versions folder is provisioned in every user's directory and is used to store old file versions. A user can revert to an older version through the web interface at any time, with the replaced file becoming a version. The app automatically manages the versions folder to ensure the user does not run out of Quota because of versions.\n\t\tIn addition to the expiry of versions, the versions app makes certain never to use more than 50% of the user's currently available free space. If stored versions exceed this limit, the app will delete the oldest versions first until it meets this limit. More information is available in the Versions documentation." : "Bu uygulama değiştirilen dosyaların önceki sürümlerini otomatik olarak izler ve saklar. etkinleştirildiğinde, dosya sürümlerini saklamak için her kullanıcının klasörlerinde gizli bir versions klasörü oluşturulur. Kullanıcılar web arayüzünü kullanarak istedikleri zaman dosyalarının daha önceki sürümlerine geri dönebilirler. Uygulama versions klasörünü otomatik olarak düzenler ve önceki dosya sürümleri nedeniyle kullanıcının kotasının dolmasını engeller.\n\t\tSürümler uygulaması dosya sürümlerini belirli bir süreyle saklarken, kullanıcı depolama alanının en çok %50 oranındaki bölümünü kullanır. Depolanan sürüm dosyalarının boyutu bu sınırın üzerine çıkarsa, sınır değerine geri dönülene kadar en eski sürüm dosyaları silinir. Ayrıntılı bilgi almak için Sürümler uygulamasının belgelerine bakabilirsiniz.", + "Download version" : "Sürümü indir", + "Restore version" : "Sürümü geri yükle", + "No versions yet" : "Henüz bir sürüm yok", + "Version restored" : "Sürüm geri yüklendi", + "Could not restore version" : "Sürüm geri yüklenemedi", "Version" : "Sürüm", "This application automatically maintains older versions of files that are changed. When enabled, a hidden versions folder is provisioned in every user’s directory and is used to store old file versions. A user can revert to an older version through the web interface at any time, with the replaced file becoming a version. The app automatically manages the versions folder to ensure the user doesn’t run out of Quota because of versions.\n\t\tIn addition to the expiry of versions, the versions app makes certain never to use more than 50% of the user’s currently available free space. If stored versions exceed this limit, the app will delete the oldest versions first until it meets this limit. More information is available in the Versions documentation." : "Bu uygulama değiştirilen dosyaların önceki sürümlerini otomatik olarak izler ve saklar. etkinleştirildiğinde, dosya sürümlerini saklamak için her kullanıcının klasörlerinde gizli bir versions klasörü oluşturulur. Kullanıcılar web arayüzünü kullanarak istedikleri zaman dosyalarının daha önceki sürümlerine geri dönebilirler. Uygulama versions klasörünü otomatik olarak düzenler ve önceki dosya sürümleri nedeniyle kullanıcının kotasının dolmasını engeller.\n\t\tSürümler uygulaması dosya sürümlerini belirli bir süreyle saklarken, kullanıcı depolama alanının en çok %50 oranındaki bölümünü kullanır. Depolanan sürüm dosyalarının boyutu bu sınırın üzerine çıkarsa, sınır değerine geri dönülene kadar en eski sürüm dosyaları silinir. Ayrıntılı bilgi almak için Sürümler uygulamasının belgelerine bakabilirsiniz.", "Failed to revert {file} to revision {timestamp}." : "{file} dosyası {timestamp} sürümüne geri alınamadı.", diff --git a/apps/theming/css/default.css b/apps/theming/css/default.css index 7b62656c4f9..bf139d0c830 100644 --- a/apps/theming/css/default.css +++ b/apps/theming/css/default.css @@ -30,8 +30,8 @@ --color-loading-dark: #444444; --color-box-shadow-rgb: 77,77,77; --color-box-shadow: rgba(var(--color-box-shadow-rgb), 0.5); - --color-border: #949494; - --color-border-dark: #808080; + --color-border: #ededed; + --color-border-dark: #dbdbdb; --font-face: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Cantarell, Ubuntu, 'Helvetica Neue', Arial, sans-serif, 'Noto Color Emoji', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; --default-font-size: 15px; --animation-quick: 100ms; @@ -55,21 +55,21 @@ --background-invert-if-bright: invert(100%); --background-image-invert-if-bright: no; --primary-invert-if-bright: no; - --color-primary: #006aa3; + --color-primary: #00639a; --color-primary-default: #0082c9; --color-primary-text: #ffffff; - --color-primary-hover: #3287b5; - --color-primary-light: #e5f0f5; - --color-primary-light-text: #002a41; - --color-primary-light-hover: #dbe5ea; + --color-primary-hover: #3282ae; + --color-primary-light: #e5eff4; + --color-primary-light-text: #00273d; + --color-primary-light-hover: #dbe4e9; --color-primary-text-dark: #ededed; - --color-primary-element: #006aa3; + --color-primary-element: #00639a; --color-primary-element-default-hover: #329bd3; --color-primary-element-text: #ffffff; - --color-primary-element-hover: #3287b5; - --color-primary-element-light: #e5f0f5; - --color-primary-element-light-text: #002a41; - --color-primary-element-light-hover: #dbe5ea; + --color-primary-element-hover: #3282ae; + --color-primary-element-light: #e5eff4; + --color-primary-element-light-text: #00273d; + --color-primary-element-light-hover: #dbe4e9; --color-primary-element-text-dark: #ededed; --gradient-primary-background: linear-gradient(40deg, var(--color-primary) 0%, var(--color-primary-hover) 100%); --image-background-default: url('/apps/theming/img/background/kamil-porembinski-clouds.jpg'); diff --git a/apps/theming/l10n/fr.js b/apps/theming/l10n/fr.js index 08815624532..6f394f9c1a1 100644 --- a/apps/theming/l10n/fr.js +++ b/apps/theming/l10n/fr.js @@ -76,8 +76,11 @@ OC.L10N.register( "Set a custom background" : "Définir un arrière-plan personnalisé", "Universal access is very important to us. We follow web standards and check to make everything usable also without mouse, and assistive software such as screenreaders. We aim to be compliant with the {guidelines}Web Content Accessibility Guidelines{linkend} 2.1 on AA level, with the high contrast theme even on AAA level." : "L'accès universel est très important pour nous. Nous suivons les standards du web et nous vérifions que tout est utilisable même sans souris et sans logiciel d'assistance comme les lecteurs d'écran. Nous visons à respecter les {guidelines}Règles pour l'accessibilité des contenus Web{linkend} 2.1 de niveau AA et même de niveau AAA avec le thème à fort contraste.", "If you find any issues, do not hesitate to report them on {issuetracker}our issue tracker{linkend}. And if you want to get involved, come join {designteam}our design team{linkend}!" : "Si vous rencontrez des problèmes, n'hésitez pas à les signaler sur {issuetracker}notre outil de suivi des problèmes{linkend}. Et si vous voulez vous impliquer, venez rejoindre {designteam}notre équipe de design{linkend} !", - "Change color" : "Modifier la couleur", - "Select a background from your files" : "Sélectionner un fond depuis vos fichiers", + "Custom background" : "Arrière-plan personnalisé", + "Default background" : "Arrière-plan par défaut", + "Change color" : "Changer la couleur", + "Remove background" : "Retirer l'arrière-plan", + "Select a background from your files" : "Sélectionner un arrière-plan parmi vos fichiers", "Theme selection is enforced" : "La sélection du thème est imposée", "Select a custom color" : "Sélectionnez une couleur personnalisée", "Reset to default" : "Restaurer les valeurs par défaut", diff --git a/apps/theming/l10n/fr.json b/apps/theming/l10n/fr.json index ae8e92f98d9..4f35e88cbd2 100644 --- a/apps/theming/l10n/fr.json +++ b/apps/theming/l10n/fr.json @@ -74,8 +74,11 @@ "Set a custom background" : "Définir un arrière-plan personnalisé", "Universal access is very important to us. We follow web standards and check to make everything usable also without mouse, and assistive software such as screenreaders. We aim to be compliant with the {guidelines}Web Content Accessibility Guidelines{linkend} 2.1 on AA level, with the high contrast theme even on AAA level." : "L'accès universel est très important pour nous. Nous suivons les standards du web et nous vérifions que tout est utilisable même sans souris et sans logiciel d'assistance comme les lecteurs d'écran. Nous visons à respecter les {guidelines}Règles pour l'accessibilité des contenus Web{linkend} 2.1 de niveau AA et même de niveau AAA avec le thème à fort contraste.", "If you find any issues, do not hesitate to report them on {issuetracker}our issue tracker{linkend}. And if you want to get involved, come join {designteam}our design team{linkend}!" : "Si vous rencontrez des problèmes, n'hésitez pas à les signaler sur {issuetracker}notre outil de suivi des problèmes{linkend}. Et si vous voulez vous impliquer, venez rejoindre {designteam}notre équipe de design{linkend} !", - "Change color" : "Modifier la couleur", - "Select a background from your files" : "Sélectionner un fond depuis vos fichiers", + "Custom background" : "Arrière-plan personnalisé", + "Default background" : "Arrière-plan par défaut", + "Change color" : "Changer la couleur", + "Remove background" : "Retirer l'arrière-plan", + "Select a background from your files" : "Sélectionner un arrière-plan parmi vos fichiers", "Theme selection is enforced" : "La sélection du thème est imposée", "Select a custom color" : "Sélectionnez une couleur personnalisée", "Reset to default" : "Restaurer les valeurs par défaut", diff --git a/apps/theming/l10n/tr.js b/apps/theming/l10n/tr.js index 3956652110c..0557406dcc1 100644 --- a/apps/theming/l10n/tr.js +++ b/apps/theming/l10n/tr.js @@ -76,7 +76,10 @@ OC.L10N.register( "Set a custom background" : "Özel bir arka plan ayarla", "Universal access is very important to us. We follow web standards and check to make everything usable also without mouse, and assistive software such as screenreaders. We aim to be compliant with the {guidelines}Web Content Accessibility Guidelines{linkend} 2.1 on AA level, with the high contrast theme even on AAA level." : "Uygulamalarımızı herkesin kullanabilmesini çok önemsiyoruz. Web standartlarını izleyerek, işlemlerin fare olmadan da yapılabilmesini ve ekran okuyucular gibi yardımcı yazılımların kullanılabilmesini sağlıyoruz. AAA düzeyinde yüksek renk karşıtlığı teması ile AA düzeyinde {guidelines}Web İçeriği Erişilebilirlik Kuralları{linkend} 2.1 ile uyumlu olmayı amaçladık.", "If you find any issues, do not hesitate to report them on {issuetracker}our issue tracker{linkend}. And if you want to get involved, come join {designteam}our design team{linkend}!" : "Bir sorunla karşılaşırsanız, bunları {issuetracker}sorun izleyicimiz{linkend} üzerinden bildirmekten çekinmeyin. Katkıda bulunmak istiyorsanız {designteam}tasarım ekibimize{linkend} katılın!", + "Custom background" : "Özel arka plan", + "Default background" : "Varsayılan arka plan", "Change color" : "Rengi değiştir", + "Remove background" : "Arka planı kaldır", "Select a background from your files" : "Dosyalarınızdan bir arka plan seçin", "Theme selection is enforced" : "Tema seçimi zorunludur", "Select a custom color" : "Özel bir renk seçin", diff --git a/apps/theming/l10n/tr.json b/apps/theming/l10n/tr.json index 527208eee16..a4800e904e0 100644 --- a/apps/theming/l10n/tr.json +++ b/apps/theming/l10n/tr.json @@ -74,7 +74,10 @@ "Set a custom background" : "Özel bir arka plan ayarla", "Universal access is very important to us. We follow web standards and check to make everything usable also without mouse, and assistive software such as screenreaders. We aim to be compliant with the {guidelines}Web Content Accessibility Guidelines{linkend} 2.1 on AA level, with the high contrast theme even on AAA level." : "Uygulamalarımızı herkesin kullanabilmesini çok önemsiyoruz. Web standartlarını izleyerek, işlemlerin fare olmadan da yapılabilmesini ve ekran okuyucular gibi yardımcı yazılımların kullanılabilmesini sağlıyoruz. AAA düzeyinde yüksek renk karşıtlığı teması ile AA düzeyinde {guidelines}Web İçeriği Erişilebilirlik Kuralları{linkend} 2.1 ile uyumlu olmayı amaçladık.", "If you find any issues, do not hesitate to report them on {issuetracker}our issue tracker{linkend}. And if you want to get involved, come join {designteam}our design team{linkend}!" : "Bir sorunla karşılaşırsanız, bunları {issuetracker}sorun izleyicimiz{linkend} üzerinden bildirmekten çekinmeyin. Katkıda bulunmak istiyorsanız {designteam}tasarım ekibimize{linkend} katılın!", + "Custom background" : "Özel arka plan", + "Default background" : "Varsayılan arka plan", "Change color" : "Rengi değiştir", + "Remove background" : "Arka planı kaldır", "Select a background from your files" : "Dosyalarınızdan bir arka plan seçin", "Theme selection is enforced" : "Tema seçimi zorunludur", "Select a custom color" : "Özel bir renk seçin", diff --git a/apps/theming/lib/Service/BackgroundService.php b/apps/theming/lib/Service/BackgroundService.php index 4879ad1cbad..a12d72109da 100644 --- a/apps/theming/lib/Service/BackgroundService.php +++ b/apps/theming/lib/Service/BackgroundService.php @@ -46,7 +46,7 @@ class BackgroundService { // true when the background is bright and need dark icons public const THEMING_MODE_DARK = 'dark'; public const DEFAULT_COLOR = '#0082c9'; - public const DEFAULT_ACCESSIBLE_COLOR = '#006aa3'; + public const DEFAULT_ACCESSIBLE_COLOR = '#00639a'; public const BACKGROUND_SHIPPED = 'shipped'; public const BACKGROUND_CUSTOM = 'custom'; diff --git a/apps/theming/lib/Themes/DarkTheme.php b/apps/theming/lib/Themes/DarkTheme.php index e43d0c04e98..ecd4c7d3fd6 100644 --- a/apps/theming/lib/Themes/DarkTheme.php +++ b/apps/theming/lib/Themes/DarkTheme.php @@ -89,8 +89,8 @@ class DarkTheme extends DefaultTheme implements ITheme { '--color-box-shadow' => $colorBoxShadow, '--color-box-shadow-rgb' => $colorBoxShadowRGB, - '--color-border' => $this->util->lighten($colorMainBackground, 30), - '--color-border-dark' => $this->util->lighten($colorMainBackground, 38), + '--color-border' => $this->util->lighten($colorMainBackground, 7), + '--color-border-dark' => $this->util->lighten($colorMainBackground, 14), '--background-invert-if-dark' => 'invert(100%)', '--background-invert-if-bright' => 'no', diff --git a/apps/theming/lib/Themes/DefaultTheme.php b/apps/theming/lib/Themes/DefaultTheme.php index 100d34864fc..1c967cd820e 100644 --- a/apps/theming/lib/Themes/DefaultTheme.php +++ b/apps/theming/lib/Themes/DefaultTheme.php @@ -155,8 +155,8 @@ class DefaultTheme implements ITheme { '--color-box-shadow-rgb' => $colorBoxShadowRGB, '--color-box-shadow' => "rgba(var(--color-box-shadow-rgb), 0.5)", - '--color-border' => $this->util->darken($colorMainBackground, 42), - '--color-border-dark' => $this->util->darken($colorMainBackground, 50), + '--color-border' => $this->util->darken($colorMainBackground, 7), + '--color-border-dark' => $this->util->darken($colorMainBackground, 14), '--font-face' => "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Cantarell, Ubuntu, 'Helvetica Neue', Arial, sans-serif, 'Noto Color Emoji', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'", '--default-font-size' => '15px', diff --git a/core/Controller/ClientFlowLoginV2Controller.php b/core/Controller/ClientFlowLoginV2Controller.php index 90dbac2ca27..3c57b190593 100644 --- a/core/Controller/ClientFlowLoginV2Controller.php +++ b/core/Controller/ClientFlowLoginV2Controller.php @@ -216,7 +216,7 @@ class ClientFlowLoginV2Controller extends Controller { return $response; } - $result = $this->loginFlowV2Service->flowDoneWithAppPassword($loginToken, $this->getServerPath(), $user, $password); + $result = $this->loginFlowV2Service->flowDoneWithAppPassword($loginToken, $this->getServerPath(), $this->userId, $password); return $this->handleFlowDone($result); } diff --git a/core/Controller/PreviewController.php b/core/Controller/PreviewController.php index 9b3acaae013..118f1b47752 100644 --- a/core/Controller/PreviewController.php +++ b/core/Controller/PreviewController.php @@ -40,7 +40,7 @@ use OCP\IPreview; use OCP\IRequest; class PreviewController extends Controller { - private string $userId; + private ?string $userId; private IRootFolder $root; private IPreview $preview; diff --git a/core/l10n/ko.js b/core/l10n/ko.js index 6e35b87fda1..73133b5137d 100644 --- a/core/l10n/ko.js +++ b/core/l10n/ko.js @@ -70,7 +70,7 @@ OC.L10N.register( "PHP does not seem to be setup properly to query system environment variables. The test with getenv(\"PATH\") only returns an empty response." : "PHP에서 시스템 환경 변수를 올바르게 조회할 수 없는 것 같습니다. getenv(\"PATH\") 시험 결과 빈 값이 반환되었습니다.", "Please check the {linkstart}installation documentation ↗{linkend} for PHP configuration notes and the PHP configuration of your server, especially when using php-fpm." : "PHP 설정과 관련된 {linkstart}문서 ↗{linkend}를 참조하시어 이 서버의 PHP 설정을 확인하십시오. 특히 php-fpm을 사용할 경우 관련성이 높습니다.", "The read-only config has been enabled. This prevents setting some configurations via the web-interface. Furthermore, the file needs to be made writable manually for every update." : "읽기 전용 설정이 활성화되었습니다. 이 상태에서는 웹 인터페이스를 통하여 일부 설정을 변경할 수 없습니다. 또한 매 업데이트마다 파일을 쓸 수 있는 상태로 변경해야 합니다.", - "You have not set or verified your email server configuration, yet. Please head over to the {mailSettingsStart}Basic settings{mailSettingsEnd} in order to set them. Afterwards, use the \"Send email\" button below the form to verify your settings." : "당신의 이메일 서버 설정은 입력되지 않았거나 검증되지 않았습니다. {mailSettingsStart}기본 설정{mailSettingsEnd}으로 이동해 설정을 완료하십시오. 이후 양식 아래 “이메일 발송” 버튼을 눌러 설정을 검증하십시오.", + "You have not set or verified your email server configuration, yet. Please head over to the {mailSettingsStart}Basic settings{mailSettingsEnd} in order to set them. Afterwards, use the \"Send email\" button below the form to verify your settings." : "이메일 서버 설정이 입력되지 않았거나 검증되지 않았습니다. {mailSettingsStart}기본 설정{mailSettingsEnd}으로 이동해 설정을 완료하십시오. 서버 정보를 입력한 후 양식 아래 “이메일 발송” 버튼을 눌러 설정을 검증하십시오.", "Your database does not run with \"READ COMMITTED\" transaction isolation level. This can cause problems when multiple actions are executed in parallel." : "데이터베이스가 \"READ COMMITTED\" 트랜잭션 격리 수준에서 실행되고 있지 않습니다. 여러 작업이 동시에 실행될 때 문제가 발생할 수 있습니다.", "The PHP module \"fileinfo\" is missing. It is strongly recommended to enable this module to get the best results with MIME type detection." : "PHP의 \"fileinfo\" 모듈이 없습니다. 올바른 MIME 형식 감지를 위해서 이 모듈을 활성화하는 것을 추천합니다.", "Please make sure to set the \"overwrite.cli.url\" option in your config.php file to the URL that your users mainly use to access this Nextcloud. Suggestion: \"{suggestedOverwriteCliURL}\". Otherwise there might be problems with the URL generation via cron. (It is possible though that the suggested URL is not the URL that your users mainly use to access this Nextcloud. Best is to double check this in any case.)" : "주로 사용할 URL이 config.php 파일의 \"overwrite.cli.url\" 옵션에 올바르게 설정되어 있는지 확인하십시오. 제안: \"{suggestedOverwriteCliURL}\". 설정이 잘못되었을 경우 cron을 통한 URL 생성에 문제가 생길 수 있습니다. (제안된 URL이 이 Nextcloud에 접근하는 주된 URL이 아닐 수 있습니다. 따라서, 해당 사항을 직접 재확인하는 것이 좋습니다.)", diff --git a/core/l10n/ko.json b/core/l10n/ko.json index 44dae7ee09b..27b14af3a94 100644 --- a/core/l10n/ko.json +++ b/core/l10n/ko.json @@ -68,7 +68,7 @@ "PHP does not seem to be setup properly to query system environment variables. The test with getenv(\"PATH\") only returns an empty response." : "PHP에서 시스템 환경 변수를 올바르게 조회할 수 없는 것 같습니다. getenv(\"PATH\") 시험 결과 빈 값이 반환되었습니다.", "Please check the {linkstart}installation documentation ↗{linkend} for PHP configuration notes and the PHP configuration of your server, especially when using php-fpm." : "PHP 설정과 관련된 {linkstart}문서 ↗{linkend}를 참조하시어 이 서버의 PHP 설정을 확인하십시오. 특히 php-fpm을 사용할 경우 관련성이 높습니다.", "The read-only config has been enabled. This prevents setting some configurations via the web-interface. Furthermore, the file needs to be made writable manually for every update." : "읽기 전용 설정이 활성화되었습니다. 이 상태에서는 웹 인터페이스를 통하여 일부 설정을 변경할 수 없습니다. 또한 매 업데이트마다 파일을 쓸 수 있는 상태로 변경해야 합니다.", - "You have not set or verified your email server configuration, yet. Please head over to the {mailSettingsStart}Basic settings{mailSettingsEnd} in order to set them. Afterwards, use the \"Send email\" button below the form to verify your settings." : "당신의 이메일 서버 설정은 입력되지 않았거나 검증되지 않았습니다. {mailSettingsStart}기본 설정{mailSettingsEnd}으로 이동해 설정을 완료하십시오. 이후 양식 아래 “이메일 발송” 버튼을 눌러 설정을 검증하십시오.", + "You have not set or verified your email server configuration, yet. Please head over to the {mailSettingsStart}Basic settings{mailSettingsEnd} in order to set them. Afterwards, use the \"Send email\" button below the form to verify your settings." : "이메일 서버 설정이 입력되지 않았거나 검증되지 않았습니다. {mailSettingsStart}기본 설정{mailSettingsEnd}으로 이동해 설정을 완료하십시오. 서버 정보를 입력한 후 양식 아래 “이메일 발송” 버튼을 눌러 설정을 검증하십시오.", "Your database does not run with \"READ COMMITTED\" transaction isolation level. This can cause problems when multiple actions are executed in parallel." : "데이터베이스가 \"READ COMMITTED\" 트랜잭션 격리 수준에서 실행되고 있지 않습니다. 여러 작업이 동시에 실행될 때 문제가 발생할 수 있습니다.", "The PHP module \"fileinfo\" is missing. It is strongly recommended to enable this module to get the best results with MIME type detection." : "PHP의 \"fileinfo\" 모듈이 없습니다. 올바른 MIME 형식 감지를 위해서 이 모듈을 활성화하는 것을 추천합니다.", "Please make sure to set the \"overwrite.cli.url\" option in your config.php file to the URL that your users mainly use to access this Nextcloud. Suggestion: \"{suggestedOverwriteCliURL}\". Otherwise there might be problems with the URL generation via cron. (It is possible though that the suggested URL is not the URL that your users mainly use to access this Nextcloud. Best is to double check this in any case.)" : "주로 사용할 URL이 config.php 파일의 \"overwrite.cli.url\" 옵션에 올바르게 설정되어 있는지 확인하십시오. 제안: \"{suggestedOverwriteCliURL}\". 설정이 잘못되었을 경우 cron을 통한 URL 생성에 문제가 생길 수 있습니다. (제안된 URL이 이 Nextcloud에 접근하는 주된 URL이 아닐 수 있습니다. 따라서, 해당 사항을 직접 재확인하는 것이 좋습니다.)", diff --git a/lib/private/Files/ObjectStore/ObjectStoreStorage.php b/lib/private/Files/ObjectStore/ObjectStoreStorage.php index 04dd846abe4..02b65bf37f7 100644 --- a/lib/private/Files/ObjectStore/ObjectStoreStorage.php +++ b/lib/private/Files/ObjectStore/ObjectStoreStorage.php @@ -309,13 +309,23 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common { case 'rb': $stat = $this->stat($path); if (is_array($stat)) { + $filesize = $stat['size'] ?? 0; // Reading 0 sized files is a waste of time - if (isset($stat['size']) && $stat['size'] === 0) { + if ($filesize === 0) { return fopen('php://memory', $mode); } try { - return $this->objectStore->readObject($this->getURN($stat['fileid'])); + $handle = $this->objectStore->readObject($this->getURN($stat['fileid'])); + if ($handle === false) { + return false; // keep backward compatibility + } + $streamStat = fstat($handle); + $actualSize = $streamStat['size'] ?? -1; + if ($actualSize > -1 && $actualSize !== $filesize) { + $this->getCache()->update((int)$stat['fileid'], ['size' => $actualSize]); + } + return $handle; } catch (NotFoundException $e) { $this->logger->logException($e, [ 'app' => 'objectstore', diff --git a/lib/private/Files/ObjectStore/S3ObjectTrait.php b/lib/private/Files/ObjectStore/S3ObjectTrait.php index a88ebbeda82..e6a2cf21cd0 100644 --- a/lib/private/Files/ObjectStore/S3ObjectTrait.php +++ b/lib/private/Files/ObjectStore/S3ObjectTrait.php @@ -29,9 +29,9 @@ namespace OC\Files\ObjectStore; use Aws\S3\Exception\S3MultipartUploadException; use Aws\S3\MultipartUploader; use Aws\S3\S3Client; +use GuzzleHttp\Psr7; use GuzzleHttp\Psr7\Utils; use OC\Files\Stream\SeekableHttpStream; -use GuzzleHttp\Psr7; use Psr\Http\Message\StreamInterface; trait S3ObjectTrait { @@ -47,6 +47,7 @@ trait S3ObjectTrait { /** * @param string $urn the unified resource name used to identify the object + * * @return resource stream with the read data * @throws \Exception when something goes wrong, message will be logged * @since 7.0.0 @@ -88,6 +89,7 @@ trait S3ObjectTrait { }); } + /** * Single object put helper * diff --git a/lib/private/Files/Stream/SeekableHttpStream.php b/lib/private/Files/Stream/SeekableHttpStream.php index df37fd29f42..51ccaeba998 100644 --- a/lib/private/Files/Stream/SeekableHttpStream.php +++ b/lib/private/Files/Stream/SeekableHttpStream.php @@ -75,8 +75,12 @@ class SeekableHttpStream implements File { /** @var ?resource|closed-resource */ private $current; + /** @var int $offset offset of the current chunk */ private int $offset = 0; + /** @var int $length length of the current chunk */ private int $length = 0; + /** @var int $totalSize size of the full stream */ + private int $totalSize = 0; private bool $needReconnect = false; private function reconnect(int $start): bool { @@ -128,6 +132,9 @@ class SeekableHttpStream implements File { $this->offset = $begin; $this->length = $length; + if ($start === 0) { + $this->totalSize = $length; + } return true; } @@ -211,7 +218,9 @@ class SeekableHttpStream implements File { public function stream_stat() { if ($this->getCurrent()) { - return fstat($this->getCurrent()); + $stat = fstat($this->getCurrent()); + $stat['size'] = $this->totalSize; + return $stat; } else { return false; } diff --git a/lib/private/Preview/Imaginary.php b/lib/private/Preview/Imaginary.php index a9883a1dd9c..e78b9b441f6 100644 --- a/lib/private/Preview/Imaginary.php +++ b/lib/private/Preview/Imaginary.php @@ -90,6 +90,8 @@ class Imaginary extends ProviderV2 { $mimeType = 'jpeg'; } + $quality = $this->config->getAppValue('preview', 'jpeg_quality', '80'); + $operations = [ [ 'operation' => 'autorotate', @@ -102,6 +104,7 @@ class Imaginary extends ProviderV2 { 'stripmeta' => 'true', 'type' => $mimeType, 'norotation' => 'true', + 'quality' => $quality, ] ] ]; |