File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
src/UmbracoFileSystemProviders.Azure Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ namespace Our.Umbraco.FileSystemProviders.Azure
16
16
using System . Linq ;
17
17
using System . Text . RegularExpressions ;
18
18
using System . Web ;
19
+ using global ::Umbraco . Core . Configuration ;
19
20
using global ::Umbraco . Core . IO ;
20
21
using Microsoft . WindowsAzure . Storage ;
21
22
using Microsoft . WindowsAzure . Storage . Blob ;
@@ -540,8 +541,19 @@ public DateTimeOffset GetLastModified(string path)
540
541
/// <returns>
541
542
/// The <see cref="string"/> representing the relative path.
542
543
/// </returns>
544
+ /// <remarks>
545
+ /// Umbraco 7.5.15 changed the way that relative paths are used for media upload.
546
+ /// This is the fixing issue where uploading file to replace creates new folder.
547
+ /// </remarks>
543
548
public string GetRelativePath ( string fullPathOrUrl )
544
549
{
550
+ var lastSafeVersion = new Version ( 7 , 5 , 14 ) ;
551
+
552
+ if ( UmbracoVersion . Current . CompareTo ( lastSafeVersion ) > 0 )
553
+ {
554
+ return this . FixPath ( fullPathOrUrl ) ;
555
+ }
556
+
545
557
return this . ResolveUrl ( fullPathOrUrl , true ) ;
546
558
}
547
559
You can’t perform that action at this time.
0 commit comments