Skip to content

Commit 9f80406

Browse files
Merge pull request #84 from east-sussex-county-council/fix-double-slash
Media files were being uploaded with paths that started //media
2 parents cade168 + 525dc4e commit 9f80406

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/UmbracoFileSystemProviders.Azure/AzureFileSystem.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -665,10 +665,10 @@ private string ResolveUrl(string path, bool relative)
665665

666666
if (this.UseDefaultRoute)
667667
{
668-
return $"{this.ApplicationVirtualPath}/{Constants.DefaultMediaRoute}/{fixedPath}";
668+
return $"{this.ApplicationVirtualPath?.TrimEnd('/')}/{Constants.DefaultMediaRoute}/{fixedPath}";
669669
}
670670

671-
return $"{this.ApplicationVirtualPath}/{this.ContainerName}/{fixedPath}";
671+
return $"{this.ApplicationVirtualPath?.TrimEnd('/')}/{this.ContainerName}/{fixedPath}";
672672
}
673673

674674
/// <summary>

0 commit comments

Comments
 (0)