Changeset View
Changeset View
Standalone View
Standalone View
src/applications/files/uploadsource/PhabricatorFileUploadSource.php
| Show First 20 Lines • Show All 183 Lines • ▼ Show 20 Lines | private function writeChunk( | ||||
| $data = $rope->getPrefixBytes($max_length); | $data = $rope->getPrefixBytes($max_length); | ||||
| $actual_length = strlen($data); | $actual_length = strlen($data); | ||||
| $rope->removeBytesFromHead($actual_length); | $rope->removeBytesFromHead($actual_length); | ||||
| $params = array( | $params = array( | ||||
| 'name' => $file->getMonogram().'.chunk-'.$offset, | 'name' => $file->getMonogram().'.chunk-'.$offset, | ||||
| 'viewPolicy' => PhabricatorPolicies::POLICY_NOONE, | 'viewPolicy' => PhabricatorPolicies::POLICY_NOONE, | ||||
| 'chunk' => true, | |||||
| ); | ); | ||||
| // If this isn't the initial chunk, provide a dummy MIME type so we do not | // If this isn't the initial chunk, provide a dummy MIME type so we do not | ||||
| // try to detect it. See T12857. | // try to detect it. See T12857. | ||||
| if ($offset > 0) { | if ($offset > 0) { | ||||
| $params['mime-type'] = 'application/octet-stream'; | $params['mime-type'] = 'application/octet-stream'; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 52 Lines • Show Last 20 Lines | |||||