public async Task <ActionResult> CreateContentFolder(string contentType, string storeId, [FromBody] ContentFolder folder) { var validation = new ContentFolderValidator().Validate(folder); if (!validation.IsValid) { return(BadRequest(new { Message = string.Join(" ", validation.Errors.Select(x => x.ErrorMessage)), Errors = validation.Errors })); } var storageProvider = _blobContentStorageProviderFactory.CreateProvider(GetContentBasePath(contentType, storeId)); await storageProvider.CreateFolderAsync(folder.ToBlobModel(AbstractTypeFactory <BlobFolder> .TryCreateInstance())); return(NoContent()); }
public IHttpActionResult CreateContentFolder(string contentType, string storeId, ContentFolder folder) { var storageProvider = _contentStorageProviderFactory(GetContentBasePath(contentType, storeId)); storageProvider.CreateFolder(folder.ToBlobModel()); return StatusCode(HttpStatusCode.NoContent); }