Changeset View
Changeset View
Standalone View
Standalone View
src/applications/files/storage/PhabricatorFile.php
Show First 20 Lines • Show All 62 Lines • ▼ Show 20 Lines | public function getConfiguration() { | ||||
return array( | return array( | ||||
self::CONFIG_AUX_PHID => true, | self::CONFIG_AUX_PHID => true, | ||||
self::CONFIG_SERIALIZATION => array( | self::CONFIG_SERIALIZATION => array( | ||||
'metadata' => self::SERIALIZATION_JSON, | 'metadata' => self::SERIALIZATION_JSON, | ||||
), | ), | ||||
self::CONFIG_COLUMN_SCHEMA => array( | self::CONFIG_COLUMN_SCHEMA => array( | ||||
'name' => 'text255?', | 'name' => 'text255?', | ||||
'mimeType' => 'text255?', | 'mimeType' => 'text255?', | ||||
'byteSize' => 'uint64?', | 'byteSize' => 'uint64', | ||||
'storageEngine' => 'text32', | 'storageEngine' => 'text32', | ||||
'storageFormat' => 'text32', | 'storageFormat' => 'text32', | ||||
'storageHandle' => 'text255', | 'storageHandle' => 'text255', | ||||
'authorPHID' => 'phid?', | 'authorPHID' => 'phid?', | ||||
'secretKey' => 'bytes20?', | 'secretKey' => 'bytes20?', | ||||
'contentHash' => 'bytes40?', | 'contentHash' => 'bytes40?', | ||||
'ttl' => 'epoch?', | 'ttl' => 'epoch?', | ||||
'isExplicitUpload' => 'bool?', | 'isExplicitUpload' => 'bool?', | ||||
'mailKey' => 'bytes20', | 'mailKey' => 'bytes20', | ||||
), | ), | ||||
self::CONFIG_KEY_SCHEMA => array( | self::CONFIG_KEY_SCHEMA => array( | ||||
'key_phid' => null, | 'key_phid' => null, | ||||
'phid' => array( | 'phid' => array( | ||||
'columns' => array('phid'), | 'columns' => array('phid'), | ||||
'unique' => true, | |||||
), | |||||
'authorPHID' => array( | |||||
'columns' => array('authorPHID'), | |||||
), | |||||
'contentHash' => array( | |||||
'columns' => array('contentHash'), | |||||
), | |||||
'key_ttl' => array( | |||||
'columns' => array('ttl'), | |||||
), | |||||
'key_dateCreated' => array( | |||||
'columns' => array('dateCreated'), | |||||
), | ), | ||||
), | ), | ||||
) + parent::getConfiguration(); | ) + parent::getConfiguration(); | ||||
} | } | ||||
public function generatePHID() { | public function generatePHID() { | ||||
return PhabricatorPHID::generateNewPHID( | return PhabricatorPHID::generateNewPHID( | ||||
PhabricatorFileFilePHIDType::TYPECONST); | PhabricatorFileFilePHIDType::TYPECONST); | ||||
▲ Show 20 Lines • Show All 1,065 Lines • Show Last 20 Lines |