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:
@@ -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(),
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user