Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15444499
D10264.id.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
D10264.id.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
@@ -213,9 +213,17 @@
pht('%s px', new PhutilNumber($height)));
}
- $finfo->addProperty(
- pht('Cacheable'),
- $file->getCanCDN() ? pht('Yes') : pht('No'));
+ $is_image = $file->isViewableImage();
+ if ($is_image) {
+ $image_string = pht('Yes');
+ $cache_string = $file->getCanCDN() ? pht('Yes') : pht('No');
+ } else {
+ $image_string = pht('No');
+ $cache_string = pht('Not Applicable');
+ }
+
+ $finfo->addProperty(pht('Viewable Image'), $image_string);
+ $finfo->addProperty(pht('Cacheable'), $cache_string);
$storage_properties = new PHUIPropertyListView();
$box->addPropertyList($storage_properties, pht('Storage'));
diff --git a/src/applications/files/storage/PhabricatorFile.php b/src/applications/files/storage/PhabricatorFile.php
--- a/src/applications/files/storage/PhabricatorFile.php
+++ b/src/applications/files/storage/PhabricatorFile.php
@@ -28,7 +28,7 @@
const METADATA_IMAGE_WIDTH = 'width';
const METADATA_IMAGE_HEIGHT = 'height';
- const METADATA_CAN_CDN = 'cancdn';
+ const METADATA_CAN_CDN = 'canCDN';
protected $name;
protected $mimeType;
@@ -848,6 +848,12 @@
if (!$this->isViewableImage()) {
return false;
}
+
+ // TODO: Migrate away this old constant and remove this check.
+ if (idx($this->metadata, 'cancdn')) {
+ return true;
+ }
+
return idx($this->metadata, self::METADATA_CAN_CDN);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Mar 28, 9:49 AM (1 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7714512
Default Alt Text
D10264.id.diff (1 KB)
Attached To
Mode
D10264: Fix `cancdn` vs `canCDN` flag
Attached
Detach File
Event Timeline
Log In to Comment