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; + } + + }