Added Multi-file delete support to media grid
Added file name change support to multi-file uploader
This commit is contained in:
@@ -18,7 +18,7 @@ namespace Umbraco.Web.WebServices
|
||||
public class FolderBrowserService
|
||||
{
|
||||
[RestExtensionMethod(returnXml = false)]
|
||||
public static string GetChildNodes(int parentId, string filterTerm)
|
||||
public static string GetChildren(int parentId, string filterTerm)
|
||||
{
|
||||
var parentMedia = new global::umbraco.cms.businesslogic.media.Media(parentId);
|
||||
var currentUser = User.GetCurrent();
|
||||
@@ -63,6 +63,27 @@ namespace Umbraco.Web.WebServices
|
||||
return new JavaScriptSerializer().Serialize(data);
|
||||
}
|
||||
|
||||
[RestExtensionMethod(returnXml = false)]
|
||||
public static string Delete(string nodeIds)
|
||||
{
|
||||
var nodeIdParts = nodeIds.Split(',');
|
||||
|
||||
foreach (var nodeIdPart in nodeIdParts.Where(x => !string.IsNullOrEmpty(x)))
|
||||
{
|
||||
var nodeId = 0;
|
||||
if (!Int32.TryParse(nodeIdPart, out nodeId))
|
||||
continue;
|
||||
|
||||
var node = new global::umbraco.cms.businesslogic.media.Media(nodeId);
|
||||
node.delete(("," + node.Path + ",").Contains(",-21,"));
|
||||
}
|
||||
|
||||
return new JavaScriptSerializer().Serialize(new
|
||||
{
|
||||
success = true
|
||||
});
|
||||
}
|
||||
|
||||
[RestExtensionMethod(returnXml = false)]
|
||||
public static string Upload(int parentId)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user