mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Merge pull request #1142 from ZogStriP/fix-can-no-longer-paste-image-in-chrome-post-editor
FIX: can no longer paste image in Chrome post editor
This commit is contained in:
@@ -172,6 +172,8 @@ Discourse.Utilities = {
|
||||
return false;
|
||||
} else if (files.length > 0) {
|
||||
var upload = files[0];
|
||||
// if the image was pasted, sets its name to a default one
|
||||
if (upload instanceof Blob && !(upload instanceof File) && upload.type === "image/png") { upload.name = "blob.png"; }
|
||||
// check that the uploaded file is authorized
|
||||
if (!Discourse.Utilities.isAuthorizedUpload(upload)) {
|
||||
var extensions = Discourse.SiteSettings.authorized_extensions.replace(/\|/g, ", ");
|
||||
|
||||
Reference in New Issue
Block a user