UX: Change default filename for images that have been pasted.

This commit is contained in:
Guo Xiang Tan
2017-02-01 14:44:41 +08:00
parent d449f782a3
commit 6c8c91dca4
2 changed files with 5 additions and 4 deletions

View File

@ -170,7 +170,7 @@ export function validateUploadedFiles(files, opts) {
// CHROME ONLY: if the image was pasted, sets its name to a default one
if (typeof Blob !== "undefined" && typeof File !== "undefined") {
if (upload instanceof Blob && !(upload instanceof File) && upload.type === "image/png") { upload.name = "blob.png"; }
if (upload instanceof Blob && !(upload instanceof File) && upload.type === "image/png") { upload.name = "__blob__.png"; }
}
opts = opts || {};