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:
Ricky Elrod
2011-07-08 00:17:00 -04:00
parent 49310391e0
commit 420235f9c4
18 changed files with 112 additions and 34 deletions

View File

@@ -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();