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
1616 using System . Linq ;
1717 using System . Text . RegularExpressions ;
1818 using System . Web ;
19+ using global ::Umbraco . Core . Configuration ;
1920 using global ::Umbraco . Core . IO ;
2021 using Microsoft . WindowsAzure . Storage ;
2122 using Microsoft . WindowsAzure . Storage . Blob ;
@@ -586,8 +587,19 @@ public DateTimeOffset GetLastModified(string path)
586587 /// <returns>
587588 /// The <see cref="string"/> representing the relative path.
588589 /// </returns>
590+ /// <remarks>
591+ /// Umbraco 7.5.15 changed the way that relative paths are used for media upload.
592+ /// This is the fixing issue where uploading file to replace creates new folder.
593+ /// </remarks>
589594 public string GetRelativePath ( string fullPathOrUrl )
590595 {
596+ var lastSafeVersion = new Version ( 7 , 5 , 14 ) ;
597+
598+ if ( UmbracoVersion . Current . CompareTo ( lastSafeVersion ) > 0 )
599+ {
600+ return this . FixPath ( fullPathOrUrl ) ;
601+ }
602+
591603 return this . ResolveUrl ( fullPathOrUrl , true ) ;
592604 }
593605
You can’t perform that action at this time.
0 commit comments