Netcore: Package support for media + media types (#9547)
* Add support for media when installing a package * clean up * Fix tests * Add support for media when installing a package * clean up * Fix tests * moved tests + test data * Migrated package tests + resources * Fix issue with media picker on package page, was empty after save. * Added missing files * Fix casing issue of resources * Added test for media * Fix tests for linux * Fix test * Fix issue with move media.. * Fix issue with adding files to packages * Add MediaType permissions. * Fix test * Fix test * Retry flaky tests, and added TODOs to fix those * new attempt to fix test Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
This commit is contained in:
@@ -13,11 +13,9 @@ using Umbraco.Core.Hosting;
|
||||
using Umbraco.Core.Models.Packaging;
|
||||
using Umbraco.Core.Security;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Web.BackOffice.Filters;
|
||||
using Umbraco.Web.Common.Attributes;
|
||||
using Umbraco.Web.Common.Authorization;
|
||||
using Umbraco.Web.Common.Exceptions;
|
||||
using Umbraco.Web.Security;
|
||||
|
||||
namespace Umbraco.Web.BackOffice.Controllers
|
||||
{
|
||||
@@ -105,7 +103,7 @@ namespace Umbraco.Web.BackOffice.Controllers
|
||||
if (package == null)
|
||||
return NotFound();
|
||||
|
||||
var fullPath = _hostingEnvironment.MapPathContentRoot(package.PackagePath);
|
||||
var fullPath = _hostingEnvironment.MapPathWebRoot(package.PackagePath);
|
||||
if (!System.IO.File.Exists(fullPath))
|
||||
throw HttpResponseException.CreateNotificationValidationErrorResponse("No file found for path " + package.PackagePath);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user