mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Fixing image paste in Media Library
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Dynamic;
|
||||
using System.IO;
|
||||
using System.Web.Mvc;
|
||||
@@ -40,7 +41,7 @@ namespace Orchard.MediaLibrary.Controllers {
|
||||
var filename = Path.GetFileName(file.FileName);
|
||||
|
||||
// if the file has been pasted, provide a default name
|
||||
if (filename == "blob") {
|
||||
if (file.ContentType.Equals("image/png", StringComparison.InvariantCultureIgnoreCase) && !filename.EndsWith(".png", StringComparison.InvariantCultureIgnoreCase)) {
|
||||
filename = "clipboard.png";
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user