Upload files to "routes"

This commit is contained in:
2026-07-24 15:43:04 +00:00
parent e3a7b0b125
commit 646a270645
3 changed files with 771 additions and 0 deletions

24
routes/CDN.cs Normal file
View File

@@ -0,0 +1,24 @@
namespace Stella.Routes
{
public class CDN
{
[ServerAPI.GET("/cdn/config/LoadingScreenTipData")]
public List<object> LoadingScreenTips()
{
return [];
}
[ServerAPI.GET("/cdn/room/{blobname}")]
public IResult GetDatablob(HttpContext ctx, string blobname)
{
string datablobPath = Path.Combine("Data", "Datablobs", blobname);
if (!File.Exists(datablobPath))
return Results.NotFound();
byte[] dbBytes = File.ReadAllBytes(datablobPath);
return Results.File(dbBytes);
}
}
}