Improve drag-and-drop uploader

Summary:
Make it discoverable, show uploading progress, show file thumbnails, allow you
to remove files, make it a generic form component.

Test Plan:
Uploaded ducks

Reviewed By: tomo
Reviewers: aran, tomo, jungejason, tuomaspelkonen
CC: anjali, aran, epriestley, tomo
Differential Revision: 334
This commit is contained in:
epriestley
2011-05-22 16:11:41 -07:00
parent 8af5bb117d
commit 109a202b6c
16 changed files with 413 additions and 121 deletions

View File

@@ -30,12 +30,13 @@ class PhabricatorFileDropUploadController extends PhabricatorFileController {
'name' => $request->getStr('name'),
));
$view = new AphrontAttachedFileView();
$view->setFile($file);
return id(new AphrontAjaxResponse())->setContent(
array(
'name' => $file->getName(),
'phid' => $file->getPHID(),
'size' => $file->getByteSize(),
'uri' => $file->getViewURI(),
'html' => $view->render(),
));
}