Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14009482
D16636.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D16636.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Thu, Oct 31, 6:50 PM (2 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6720345
Default Alt Text
D16636.diff (1 KB)
Attached To
Mode
D16636: When a file is stored as chunks, show "Format: Chunks" instead of "Format: Raw"
Attached
Detach File
Event Timeline
Log In to Comment