mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 03:36:18 +08:00
UX: Change default filename for images that have been pasted.
This commit is contained in:
@ -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 || {};
|
||||
|
Reference in New Issue
Block a user