mirror of
https://github.com/Stone-Red-Code/Decho.git
synced 2026-09-04 00:46:11 +02:00
Add EchoHub as submodule and update project references paths
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
[submodule "EchoHub"]
|
||||
path = EchoHub
|
||||
url = https://github.com/HueByte/EchoHub.git
|
||||
+2
-2
@@ -34,7 +34,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\EchoHub\src\EchoHub.Client\EchoHub.Client.csproj" />
|
||||
<ProjectReference Include="..\..\EchoHub\src\EchoHub.Core\EchoHub.Core.csproj" />
|
||||
<ProjectReference Include="..\EchoHub\src\EchoHub.Client\EchoHub.Client.csproj" />
|
||||
<ProjectReference Include="..\EchoHub\src\EchoHub.Core\EchoHub.Core.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
@@ -388,7 +388,18 @@ public sealed class ConnectionService : IDisposable
|
||||
{
|
||||
if (!_connections.TryGetValue(serverUrl, out var entry))
|
||||
return null;
|
||||
return await entry.ApiClient.DownloadBytesAsync(relativeUrl);
|
||||
try
|
||||
{
|
||||
var tempPath = await entry.ApiClient.DownloadFileToTempAsync(relativeUrl, "image");
|
||||
if (tempPath is null) return null;
|
||||
var bytes = await File.ReadAllBytesAsync(tempPath);
|
||||
try { File.Delete(tempPath); } catch { }
|
||||
return bytes;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public string? GetCurrentUsername(string serverUrl)
|
||||
|
||||
Submodule
+1
Submodule EchoHub added at 3538ec8005
Reference in New Issue
Block a user