AB4375 - Moved Media from Umbraco.Web to Umbraco.Infrastructure and added reference to System.Drawing.Common

This commit is contained in:
Bjarke Berg
2020-01-08 13:31:14 +01:00
parent c82772228c
commit 33525f3ea9
57 changed files with 7 additions and 61 deletions

View File

@@ -1,10 +1,9 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Web;
using System.Xml;
using Umbraco.Core.Media;
@@ -19,7 +18,7 @@ namespace Umbraco.Web.Media.EmbedProviders
public abstract string[] UrlSchemeRegex { get; }
public abstract Dictionary<string, string> RequestParams { get; }
public abstract string GetMarkup(string url, int maxWidth = 0, int maxHeight = 0);
public virtual string GetEmbedProviderUrl(string url, int maxWidth, int maxHeight)
@@ -30,7 +29,7 @@ namespace Umbraco.Web.Media.EmbedProviders
var fullUrl = new StringBuilder();
fullUrl.Append(ApiEndpoint);
fullUrl.Append("?url=" + HttpUtility.UrlEncode(url));
fullUrl.Append("?url=" + WebUtility.UrlEncode(url));
foreach (var param in RequestParams)
fullUrl.Append($"&{param.Key}={param.Value}");
@@ -43,7 +42,7 @@ namespace Umbraco.Web.Media.EmbedProviders
return fullUrl.ToString();
}
public virtual string DownloadResponse(string url)
{
if (_httpClient == null)

View File

@@ -13,7 +13,7 @@ namespace Umbraco.Web.Media
/// <summary>
/// Provides methods to manage auto-fill properties for upload fields.
/// </summary>
internal class UploadAutoFillProperties
public class UploadAutoFillProperties
{
private readonly IMediaFileSystem _mediaFileSystem;
private readonly ILogger _logger;
@@ -40,7 +40,7 @@ namespace Umbraco.Web.Media
ResetProperties(content, autoFillConfig, culture, segment);
}
/// <summary>
/// Populates the auto-fill properties of a content item, for a specified auto-fill configuration.
/// </summary>

View File

@@ -26,6 +26,7 @@
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" />
<PackageReference Include="Serilog.Sinks.Map" Version="1.0.0" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.0" />
<PackageReference Include="System.Drawing.Common" Version="4.7.0" />
</ItemGroup>
<ItemGroup>

View File

@@ -180,60 +180,6 @@
<Compile Include="Logging\WebProfilerComposer.cs" />
<Compile Include="Logging\WebProfilerProvider.cs" />
<Compile Include="Macros\IMacroRenderer.cs" />
<Compile Include="Media\EmbedProviders\Giphy.cs" />
<Compile Include="Media\EmbedProviders\YouTube.cs" />
<Compile Include="Media\EmbedProviders\EmbedProviderBase.cs" />
<Compile Include="Media\EmbedProviders\EmbedProvidersCollection.cs" />
<Compile Include="Media\EmbedProviders\EmbedProvidersCollectionBuilder.cs" />
<Compile Include="Media\EmbedProviders\Flickr.cs" />
<Compile Include="Media\EmbedProviders\GettyImages.cs" />
<Compile Include="Media\EmbedProviders\DailyMotion.cs" />
<Compile Include="Media\EmbedProviders\SoundCloud.cs" />
<Compile Include="Media\EmbedProviders\Hulu.cs" />
<Compile Include="Media\EmbedProviders\Ted.cs" />
<Compile Include="Media\EmbedProviders\Issuu.cs" />
<Compile Include="Media\EmbedProviders\Vimeo.cs" />
<Compile Include="Media\EmbedProviders\Twitter.cs" />
<Compile Include="Media\EmbedProviders\Kickstarter.cs" />
<Compile Include="Media\EmbedProviders\OEmbedResponse.cs" />
<Compile Include="Media\EmbedProviders\Instagram.cs" />
<Compile Include="Media\EmbedProviders\Slideshare.cs" />
<Compile Include="Media\Exif\BitConverterEx.cs" />
<Compile Include="Media\Exif\ExifBitConverter.cs" />
<Compile Include="Media\Exif\ExifEnums.cs" />
<Compile Include="Media\Exif\ExifExceptions.cs" />
<Compile Include="Media\Exif\ExifExtendedProperty.cs" />
<Compile Include="Media\Exif\ExifFileTypeDescriptor.cs" />
<Compile Include="Media\Exif\ExifInterOperability.cs" />
<Compile Include="Media\Exif\ExifProperty.cs" />
<Compile Include="Media\Exif\ExifPropertyCollection.cs" />
<Compile Include="Media\Exif\ExifPropertyFactory.cs" />
<Compile Include="Media\Exif\ExifTag.cs" />
<Compile Include="Media\Exif\ExifTagFactory.cs" />
<Compile Include="Media\Exif\IFD.cs" />
<Compile Include="Media\Exif\ImageFile.cs" />
<Compile Include="Media\Exif\ImageFileDirectory.cs" />
<Compile Include="Media\Exif\ImageFileDirectoryEntry.cs" />
<Compile Include="Media\Exif\ImageFileFormat.cs" />
<Compile Include="Media\Exif\JFIFEnums.cs" />
<Compile Include="Media\Exif\JFIFExtendedProperty.cs" />
<Compile Include="Media\Exif\JFIFThumbnail.cs" />
<Compile Include="Media\Exif\JPEGExceptions.cs" />
<Compile Include="Media\Exif\JPEGFile.cs" />
<Compile Include="Media\Exif\JPEGMarker.cs" />
<Compile Include="Media\Exif\JPEGSection.cs" />
<Compile Include="Media\Exif\MathEx.cs" />
<Compile Include="Media\Exif\SvgFile.cs" />
<Compile Include="Media\Exif\TIFFFile.cs" />
<Compile Include="Media\Exif\TIFFHeader.cs" />
<Compile Include="Media\Exif\TIFFStrip.cs" />
<Compile Include="Media\Exif\Utility.cs" />
<Compile Include="Media\ImageHelper.cs" />
<Compile Include="Media\TypeDetector\JpegDetector.cs" />
<Compile Include="Media\TypeDetector\RasterizedTypeDetector.cs" />
<Compile Include="Media\TypeDetector\SvgDetector.cs" />
<Compile Include="Media\TypeDetector\TIFFDetector.cs" />
<Compile Include="Media\UploadAutoFillProperties.cs" />
<Compile Include="Migrations\PostMigrations\PublishedSnapshotRebuilder.cs" />
<Compile Include="Models\AnchorsModel.cs" />
<Compile Include="Models\ContentEditing\DataTypeReferences.cs" />