Page MenuHomePhabricator

Pick a better filename than 'undefined' when copy/pasting images
Closed, ResolvedPublic

Description

some when use copy a screen-shot in clipboard and past direct in to textarea in Chrome, the file can be uploaded correctly, but it shows "undefine" in file list, can we rename the file with a format like "uploadfile_20140820163500"

undefined (159×1 px, 14 KB)

Event Timeline

taoqiping raised the priority of this task from to Needs Triage.
taoqiping updated the task description. (Show Details)
taoqiping added a project: Maniphest.
taoqiping added a subscriber: taoqiping.
chad renamed this task from rename for copy-past image to Pick a better filename than 'undefined' when copy/pasting images.Aug 20 2014, 3:34 PM
chad triaged this task as Low priority.
chad edited projects, added Files; removed Maniphest.
epriestley added a subscriber: epriestley.
  • At a minimum, we should use "pasted_file" or something instead of "undefined" (which is probably a JS bug).
  • If we can read a real filename, that's ideal.
  • This feature (copy/pasting images directly into a remarkup text box) is specific to Chrome.

We can't read a real filename -

https://code.google.com/p/chromium/issues/detail?id=361145

The argument is that there is no file - just some data on the clipboard - and that things like OS X letting you copy a file into the clipboard are OS-specific.