Drag-drop file upload.
Summary: - have files be uploaded by drag+drop instead of browse. - Files are named by their uploaded filename, the user isn't given a chance to enter a file name. Is this bad? - Store author PHID now with files - Allow an ?author=<username> to limit the /files/ list by author. - If one file is uploaded, the user is taken to its info page. - If several are uploaded, they are taken to a list of their files. Test Plan: - Quickly tested everything and it still worked, I'd recommend some people try this out before it gets committed though. It's a rather huge revision. Reviewers: epriestley, Ttech CC: Differential Revision: 612
This commit is contained in:
@@ -20,6 +20,7 @@ class PhabricatorFileDropUploadController extends PhabricatorFileController {
|
||||
|
||||
public function processRequest() {
|
||||
$request = $this->getRequest();
|
||||
$user = $request->getUser();
|
||||
|
||||
$data = file_get_contents('php://input');
|
||||
$name = $request->getStr('name');
|
||||
@@ -28,6 +29,7 @@ class PhabricatorFileDropUploadController extends PhabricatorFileController {
|
||||
$data,
|
||||
array(
|
||||
'name' => $request->getStr('name'),
|
||||
'authorPHID' => $user->getPHID(),
|
||||
));
|
||||
|
||||
$view = new AphrontAttachedFileView();
|
||||
|
||||
Reference in New Issue
Block a user