Page MenuHomePhabricator

D16636.id.diff
No OneTemporary

D16636.id.diff

diff --git a/src/applications/files/controller/PhabricatorFileInfoController.php b/src/applications/files/controller/PhabricatorFileInfoController.php
--- a/src/applications/files/controller/PhabricatorFileInfoController.php
+++ b/src/applications/files/controller/PhabricatorFileInfoController.php
@@ -285,12 +285,17 @@
pht('Engine'),
$file->getStorageEngine());
- $format_key = $file->getStorageFormat();
- $format = PhabricatorFileStorageFormat::getFormat($format_key);
- if ($format) {
- $format_name = $format->getStorageFormatName();
+ $engine = $this->loadStorageEngine($file);
+ if ($engine && $engine->isChunkEngine()) {
+ $format_name = pht('Chunks');
} else {
- $format_name = pht('Unknown ("%s")', $format_key);
+ $format_key = $file->getStorageFormat();
+ $format = PhabricatorFileStorageFormat::getFormat($format_key);
+ if ($format) {
+ $format_name = $format->getStorageFormatName();
+ } else {
+ $format_name = pht('Unknown ("%s")', $format_key);
+ }
}
$storage_properties->addProperty(pht('Format'), $format_name);
@@ -369,13 +374,7 @@
$box->addPropertyList($media);
}
- $engine = null;
- try {
- $engine = $file->instantiateStorageEngine();
- } catch (Exception $ex) {
- // Don't bother raising this anywhere for now.
- }
-
+ $engine = $this->loadStorageEngine($file);
if ($engine) {
if ($engine->isChunkEngine()) {
$chunkinfo = new PHUIPropertyListView();
@@ -436,4 +435,17 @@
}
+ private function loadStorageEngine(PhabricatorFile $file) {
+ $engine = null;
+
+ try {
+ $engine = $file->instantiateStorageEngine();
+ } catch (Exception $ex) {
+ // Don't bother raising this anywhere for now.
+ }
+
+ return $engine;
+ }
+
+
}

File Metadata

Mime Type
text/plain
Expires
Sat, Oct 26, 1:34 AM (3 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6720345
Default Alt Text
D16636.id.diff (1 KB)

Event Timeline