Fixes up more permissions checks, refactors MediaController.PostAddFile to use the correct WebAPI usage. Fixes issue with UmbracoClientManager throwing errors because the treeProps didn't include all called props.

This commit is contained in:
Shannon
2013-09-03 16:35:36 +10:00
parent f0a2bfdea4
commit 7c9f5eda9d
10 changed files with 118 additions and 64 deletions

View File

@@ -16,6 +16,7 @@ using System.Web.ModelBinding;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using Umbraco.Core;
using Umbraco.Core.IO;
using Umbraco.Core.Models;
using Umbraco.Web.Models.ContentEditing;
using Umbraco.Web.Security;
@@ -54,7 +55,7 @@ namespace Umbraco.Web.WebApi.Binders
throw new HttpResponseException(HttpStatusCode.UnsupportedMediaType);
}
var root = HttpContext.Current.Server.MapPath("~/App_Data/TEMP/FileUploads");
var root = IOHelper.MapPath("~/App_Data/TEMP/FileUploads");
//ensure it exists
Directory.CreateDirectory(root);
var provider = new MultipartFormDataStreamProvider(root);