add new upload endpoint, so we can get rid of base64 for uploading images
This commit is contained in:
parent
499de238cb
commit
e15ce6ba8b
4 changed files with 111 additions and 1 deletions
|
|
@ -188,6 +188,9 @@ public class Program
|
|||
case "/_larpix/encryptedrequest":
|
||||
await Account.Requests.EncryptedRequest(context, next, query, reader);
|
||||
return;
|
||||
case "/_larpix/upload":
|
||||
await Account.Requests.Upload(context, next, query);
|
||||
return;
|
||||
case "/_larpix/federation":
|
||||
await Federation.Receiver.FederationRequest(context, next, query, reader);
|
||||
return;
|
||||
|
|
@ -201,7 +204,10 @@ public class Program
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
await context.Response.WriteAsync($"error:unknown.error");
|
||||
if (ex.Message.StartsWith("error:"))
|
||||
await context.Response.WriteAsync(ex.Message);
|
||||
else
|
||||
await context.Response.WriteAsync($"error:unknown.error");
|
||||
Console.WriteLine(ex);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue