mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 20:10:55 +01:00
Remarkup - call pasted files "pasted_file" rather than "undefined"
Summary: Fixes T5917. Turns out that pasted files don't get a name - "what is data on a clipboard anyway?" / see https://code.google.com/p/chromium/issues/detail?id=361145 Test Plan: pasted a file and got the slightly better name "pasted_file" Reviewers: epriestley Reviewed By: epriestley Subscribers: epriestley, Korvin Maniphest Tasks: T5917 Differential Revision: https://secure.phabricator.com/D10310
This commit is contained in:
parent
66fa59d04d
commit
0ddafc4bcd
2 changed files with 18 additions and 12 deletions
|
@ -11,7 +11,7 @@ return array(
|
|||
'core.pkg.js' => 'f67c8265',
|
||||
'darkconsole.pkg.js' => 'df001cab',
|
||||
'differential.pkg.css' => '36884139',
|
||||
'differential.pkg.js' => 'eb182ccd',
|
||||
'differential.pkg.js' => 'fe026527',
|
||||
'diffusion.pkg.css' => '591664fa',
|
||||
'diffusion.pkg.js' => 'bfc0737b',
|
||||
'maniphest.pkg.css' => 'f5d89daf',
|
||||
|
@ -437,7 +437,7 @@ return array(
|
|||
'rsrc/js/application/uiexample/gesture-example.js' => '558829c2',
|
||||
'rsrc/js/application/uiexample/notification-example.js' => '7a9677fc',
|
||||
'rsrc/js/core/Busy.js' => '6453c869',
|
||||
'rsrc/js/core/DragAndDropFileUpload.js' => 'f61aa8ec',
|
||||
'rsrc/js/core/DragAndDropFileUpload.js' => '8c49f386',
|
||||
'rsrc/js/core/DraggableList.js' => 'bfccc644',
|
||||
'rsrc/js/core/FileUpload.js' => 'a4ae61bf',
|
||||
'rsrc/js/core/Hovercard.js' => '7e8468ae',
|
||||
|
@ -712,7 +712,7 @@ return array(
|
|||
'phabricator-countdown-css' => '86b7b0a0',
|
||||
'phabricator-crumbs-view-css' => '7fbf25b8',
|
||||
'phabricator-dashboard-css' => 'a2bfdcbf',
|
||||
'phabricator-drag-and-drop-file-upload' => 'f61aa8ec',
|
||||
'phabricator-drag-and-drop-file-upload' => '8c49f386',
|
||||
'phabricator-draggable-list' => 'bfccc644',
|
||||
'phabricator-fatal-config-template-css' => '25d446d6',
|
||||
'phabricator-feed-css' => '4e544db4',
|
||||
|
@ -1385,6 +1385,14 @@ return array(
|
|||
'javelin-request',
|
||||
'javelin-typeahead-source',
|
||||
),
|
||||
'8c49f386' => array(
|
||||
'javelin-install',
|
||||
'javelin-util',
|
||||
'javelin-request',
|
||||
'javelin-dom',
|
||||
'javelin-uri',
|
||||
'phabricator-file-upload',
|
||||
),
|
||||
'8d199d97' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
|
@ -1867,14 +1875,6 @@ return array(
|
|||
'multirow-row-manager',
|
||||
'javelin-json',
|
||||
),
|
||||
'f61aa8ec' => array(
|
||||
'javelin-install',
|
||||
'javelin-util',
|
||||
'javelin-request',
|
||||
'javelin-dom',
|
||||
'javelin-uri',
|
||||
'phabricator-file-upload',
|
||||
),
|
||||
'f6555212' => array(
|
||||
'javelin-install',
|
||||
'javelin-reactornode',
|
||||
|
|
|
@ -158,7 +158,13 @@ JX.install('PhabricatorDragAndDropFileUpload', {
|
|||
if (!/^image\//.test(item.type)) {
|
||||
continue;
|
||||
}
|
||||
this._sendRequest(item.getAsFile());
|
||||
var spec = item.getAsFile();
|
||||
// pasted files don't have a name; see
|
||||
// https://code.google.com/p/chromium/issues/detail?id=361145
|
||||
if (!spec.name) {
|
||||
spec.name = 'pasted_file';
|
||||
}
|
||||
this._sendRequest(spec);
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue