mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-12-02 17:13:33 +01:00
feat(go): implement current Node backend features
This commit is contained in:
1 parent
566171342c
commit
c201847b83
84 files changed
+8921
-384
No files matched your search
@@ -205,6 +205,10 @@ func (s *Server) sharedSourceRead(ctx context.Context, r M, p provider.Repositor
|
||||
context.AfterFunc(work, func() { bounded.Close() })
|
||||
return bounded, nil
|
||||
}
|
||||
if err = s.reserveBillingExpansion(ctx, a.Ref.AnonymousID, entry.Path, reader.Record().Size-entry.Size); err != nil {
|
||||
reader.Close()
|
||||
return nil, err
|
||||
}
|
||||
if reader.Record().Size > anonymize.MaxInput {
|
||||
reader.Close()
|
||||
return nil, fail("file_too_big", 413)
|
||||
|
||||
Reference in new issue
Block a user