mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 16:47:22 +01:00
Update ApIController.Functions.Files.cs
Only replace the first occurrence of "ws" in the Uri string
This commit is contained in:
parent
04afc4db02
commit
f718ebef9b
1 changed files with 2 additions and 1 deletions
|
|
@ -5,6 +5,7 @@ using System.Linq;
|
|||
using System.Net;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using LZ4;
|
||||
|
|
@ -55,7 +56,7 @@ namespace MareSynchronos.WebAPI
|
|||
wc.DownloadProgressChanged += progChanged;
|
||||
|
||||
string fileName = Path.GetTempFileName();
|
||||
var baseUri = new Uri(ApiUri.Replace("ws", "http"), UriKind.Absolute);
|
||||
var baseUri = new Uri(Regex.Replace(ApiUri, "^ws", "http"), UriKind.Absolute);
|
||||
var relativeUri = new Uri("cache/" + hash, UriKind.Relative);
|
||||
var fileUri = new Uri(baseUri, relativeUri);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue