From 240c50b06ccc4ea3e9e4117833db16322e77d7b0 Mon Sep 17 00:00:00 2001 From: arzumify Date: Sat, 11 Jan 2025 15:40:25 +0000 Subject: [PATCH] Switched to a limitedReader instead --- main.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 9027110..a4aa2ee 100644 --- a/main.go +++ b/main.go @@ -4,6 +4,7 @@ import ( "crypto/ed25519" library "git.ailur.dev/ailur/fg-library/v3" "github.com/google/uuid" + "io" "time" ) @@ -21,9 +22,9 @@ type OAuthResponse struct { } type File struct { - Name string `validate:"required"` - User uuid.UUID `validate:"required"` - Bytes []byte // Only used in write operations + Name string `validate:"required"` + User uuid.UUID `validate:"required"` + Reader io.LimitedReader // Only used for write operations } type Quota struct {