Commit Graph

34 Commits

Author SHA1 Message Date
Ronald Barendse
bd8d7b91d6 Support plain file path strings as Image Cropper values 2021-09-08 12:07:05 +02:00
Ronald Barendse
b145f09368 Ensure TryGetMediaPath only returns true on non-empty values 2021-09-08 12:03:56 +02:00
Shannon
3eb54831cb Remove OriginalMediaPathScheme, changes how we extract the media file path and use that correctly instead of hacks. 2021-07-07 14:36:52 -06:00
Bjarke Berg
65b20572b7 V9: Resolve virtual view paths from DataEditorAttribute in DataValueEditor (#10279)
* https://github.com/umbraco/Umbraco-CMS/issues/10265
Resolve virtual view paths from DataEditorAttribute in DataValueEditor + Introduced an IDataValueEditorFactory, so we don't need to inject nested dependencies every time we introduce a new dependency in DataValueEditor..

* Cleanup + xml doc
2021-05-18 12:40:24 +02:00
Mole
2bf86acf38 V9: Place notifications in the same namespace (#10231)
* Gather all notifications in Umbraco.Cms.Core.Notifications

* Rename notifications to match convention

* Move and rename missed notifications

* Move the three remaining public notification into Umbraco.Cms.Core.Notifications
2021-05-11 14:33:49 +02:00
Mole
c9ebaadf23 Netcore: File systems rework (#10181)
* Allow IMediaFileSystem to be replace in the DI, or registered with inner filesystem

* Remove GetFileSystem from Filesystems

It was only used by tests.

* Make MediaFileSystem inherit from PhysicalFileSystem directly

* Remove FileSystemWrapper

* Remove inner filesystem from MediaFileSystem

* Add MediaFileManager and bare minimum to make it testable

* Remove MediaFileSystem

* Fix unit tests using MediaFileManager

* Remove IFileSystem and rely only on FileSystem

* Hide dangerous methods in FileSystems and do some cleaning

* Apply stylecop warnings to MediaFileManager

* Add FilesystemsCreator to Tests.Common

This allows you to create an instance if FileSystems with your own specified IFileSystem for testing purposes outside our own test suite.

* Allow the stylesheet filesystem to be replaced.

* Fix tests

* Don't save stylesheetWrapper in a temporary var

* refactor(FileSystems): change how stylesheet filesystem is registered

* fix(FileSystems): unable to overwrite media filesystem

SetMediaFileSystem added the MediaManager as a Singleton instead of
replacing the existing instance.

* fix(FileSystems): calling AddFileSystems replaces MediaManager

When calling AddFileSystems after SetMediaFileSystem the MediaManager
gets replaced by the default PhysicalFileSystem, so instead of calling
SetMediaFileSystem in AddFileSystems we now call TrySetMediaFileSystem
instead. This method will not replace any existing instance of the
MediaManager if there's already a MediaManager registered.

* Use SetMediaFileSystem instead of TrySet, and rename AddFilesystems to ConfigureFileSystems

Also don't call AddFileSystems again in ConfigureFilesystems

* Don't wrap CSS filesystem twice

* Add CreateShadowWrapperInternal to avoid casting

* Throw UnauthorizedAccessException isntead of InvalidOperationException

* Remove ResetShadowId

Co-authored-by: Rasmus John Pedersen <mail@rjp.dk>
2021-04-27 09:52:17 +02:00
Bjarke Berg
ba6eea4f6f Move notifications to core instead of infrastructure 2021-04-09 13:43:39 +02:00
Kenn Jacobsen
ef178c5606 Use explicitly typed notifications instead of generic ones 2021-03-16 09:21:27 +01:00
Kenn Jacobsen
0db4e30fcf Merged with netcore/dev 2021-03-16 08:53:32 +01:00
Kenn Jacobsen
7593ddfaa8 Explicitly typed notifications instead of generic ones 2021-03-16 06:55:55 +01:00
Kenn Jacobsen
eb74f74c91 Replace static events with notifications in MemberService, PublicAccessService and UserService, and clean up unused components etc. 2021-03-09 07:52:32 +01:00
Kenn Jacobsen
6c942f26c8 Let the file upload and image cropper editors clean up files themselves 2021-03-03 10:11:00 +01:00
Kenn Jacobsen
f8db15dcc7 Wire up notification handlers in a composer 2021-03-03 09:02:29 +01:00
Kenn Jacobsen
1462e6c3af Split notifications into separate classes + move namespace 2021-03-02 14:30:57 +01:00
Kenn Jacobsen
c3048193c1 Removed most of the static events in MediaService 2021-03-01 20:12:36 +01:00
Kenn Jacobsen
ab2b35904f Remove a bunch more events from ContentService 2021-03-01 17:05:59 +01:00
Mole
b17c3158c0 Align namespaces in PropertyEditors to Umbraco.Cms.Core.* 2021-02-15 10:42:35 +01:00
Mole
dd488a15f4 Move extension methods in core project to Umbraco.Extensions 2021-02-09 13:21:17 +01:00
Mole
216fb87c79 Rename Umbraco.Core namespace to Umbraco.Cms.Core 2021-02-09 10:22:42 +01:00
Bjarke Berg
fb18317c0f Moved lots of property editors into core 2020-12-04 19:01:52 +01:00
Mole
8258178c5a Merge remote-tracking branch 'origin/netcore/netcore' into netcore/feature/migrate-logging
# Conflicts:
#	src/Umbraco.Infrastructure/Media/UploadAutoFillProperties.cs
#	src/Umbraco.Infrastructure/PropertyEditors/FileUploadPropertyEditor.cs
#	src/Umbraco.Infrastructure/PropertyEditors/ImageCropperPropertyEditor.cs
#	src/Umbraco.Tests/Models/MediaXmlTest.cs
#	src/Umbraco.Tests/Routing/MediaUrlProviderTests.cs
#	src/Umbraco.Web.BackOffice/Controllers/BackOfficeController.cs
#	src/Umbraco.Web.BackOffice/Controllers/MediaController.cs
2020-09-23 13:32:49 +02:00
Bjarke Berg
e9597c0f3f https://github.com/umbraco/Umbraco-CMS/pull/8948 - Injecting UploadAutoFillProperties instead of newing it up
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-09-22 21:24:12 +02:00
Andy Butland
f42e8856db Removed supported image file types from configuration and set up as a property on IImageUrlGenerator, so different providers can indicate support for different sets of images. 2020-09-22 15:06:22 +02:00
Mole
a3d74bb79f Remove public Logger from DataEditor
It was only used one place where it shouldn't be used
2020-09-18 14:45:22 +02:00
Mole
578e8c4f9e Use MS ILogger for DataEditor 2020-09-18 14:37:19 +02:00
Mole
d61b9f54fa Merge options 2020-09-18 12:53:06 +02:00
Nikolaj
dda6fb12a3 Remove LogError<T> from LoggerExtensions 2020-09-16 09:40:49 +02:00
Nikolaj
d7e3bce741 Rename Error to align it with MS ILogger 2020-09-14 09:10:53 +02:00
Andy Butland
64f8752587 Removed introduced second constructors for IOptions based depenedencies and used Options.Create instead. 2020-08-26 11:58:44 +02:00
Andy Butland
2cd91a5a54 Converted to IOptions over IOptionsSnapshot due to the latter only working in scoped services.
Further amends to return to booting application.
2020-08-23 23:36:48 +02:00
Andy Butland
e3a44c6717 Moved configuration setting POCOs into Umbraco.Core and adjusted references.
Amended injection of some settings to use IOptionsSnapshot.
2020-08-20 22:18:50 +01:00
Bjarke Berg
c486444eda Cleaned up config for Content settings 2020-03-12 15:30:22 +01:00
Shannon
13a56eb085 Renames and refactors the MediaUrlGeneratorCollection and ensure that this collection is used wherever IMediaUrlGenerator is needed instead of relying property editors possibly being the implementation. 2020-02-19 16:37:00 +11:00
elitsa
c588fc085b Migrating FileUploadPropertyEditor and its PropertyEditor dependencies. Fixing its tests due to the changes 2020-01-14 16:53:20 +01:00