Page MenuHomePhabricator

D16636.diff
No OneTemporary

D16636.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
Mon, May 13, 4:21 AM (1 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6288101
Default Alt Text
D16636.diff (1 KB)

Event Timeline