Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15408470
D16059.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
942 B
Referenced Files
None
Subscribers
None
D16059.diff
View Options
diff --git a/src/workflow/ArcanistDiffWorkflow.php b/src/workflow/ArcanistDiffWorkflow.php
--- a/src/workflow/ArcanistDiffWorkflow.php
+++ b/src/workflow/ArcanistDiffWorkflow.php
@@ -2591,10 +2591,6 @@
foreach ($need_upload as $key => $spec) {
$change = $need_upload[$key]['change'];
- $type = $spec['type'];
- $size = strlen($spec['data']);
-
- $change->setMetadata("{$type}:file:size", $size);
if ($spec['data'] === null) {
// This covers the case where a file was added or removed; we don't
// need to upload the other half of it (e.g., the old file data for
@@ -2604,6 +2600,11 @@
continue;
}
+ $type = $spec['type'];
+ $size = strlen($spec['data']);
+
+ $change->setMetadata("{$type}:file:size", $size);
+
$mime = $this->getFileMimeType($spec['data']);
if (preg_match('@^image/@', $mime)) {
$change->setFileType($type_image);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 19, 11:20 PM (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7227330
Default Alt Text
D16059.diff (942 B)
Attached To
Mode
D16059: Don't specify size 0 for deleted files
Attached
Detach File
Event Timeline
Log In to Comment