mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 20:10:55 +01:00
Set name parameter when saving file via Drydock
Summary: This sets the name parameter when Drydock uploads a file so that the storage engine picks it up correctly. Test Plan: N/A Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: epriestley, Korvin Differential Revision: https://secure.phabricator.com/D8673
This commit is contained in:
parent
26c836e1e1
commit
85394a9e9e
1 changed files with 3 additions and 1 deletions
|
@ -46,7 +46,9 @@ final class DrydockSFTPFilesystemInterface extends DrydockFilesystemInterface {
|
||||||
|
|
||||||
public function saveFile($path, $name) {
|
public function saveFile($path, $name) {
|
||||||
$data = $this->readFile($path);
|
$data = $this->readFile($path);
|
||||||
$file = PhabricatorFile::newFromFileData($data);
|
$file = PhabricatorFile::newFromFileData(
|
||||||
|
$data,
|
||||||
|
array('name' => $name));
|
||||||
$file->setName($name);
|
$file->setName($name);
|
||||||
$file->save();
|
$file->save();
|
||||||
return $file;
|
return $file;
|
||||||
|
|
Loading…
Reference in a new issue