• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

a1y-developer / doc-formatter / 20615518441

31 Dec 2025 08:45AM UTC coverage: 65.274% (-2.5%) from 67.802%
20615518441

Pull #23

github

web-flow
Merge 927ec1ce0 into 3f7df65bc
Pull Request #23: feat: upload to s3

293 of 507 new or added lines in 30 files covered. (57.79%)

3 existing lines in 2 files now uncovered.

906 of 1388 relevant lines covered (65.27%)

0.71 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

60.0
/internal/storage/handler/document_handler.go
1
package handler
2

3
import (
4
        "bytes"
5
        "context"
6

7
        storagepb "github.com/a1y/doc-formatter/api/grpc/storage/v1"
8
        "github.com/a1y/doc-formatter/internal/storage/domain/entity"
9
        "github.com/google/uuid"
10
)
11

12
func (h *Handler) UploadFile(ctx context.Context, req *storagepb.UploadFileRequest) (*storagepb.UploadFileResponse, error) {
1✔
13
        reader := bytes.NewReader(req.Content)
1✔
14
        documentEntity := entity.Document{
1✔
15
                UserID:   uuid.MustParse(req.UserId),
1✔
16
                FileName: req.FileName,
1✔
17
                FileSize: req.FileSize,
1✔
18
        }
1✔
19
        documentResponse, err := h.documentManager.UploadDocument(ctx, &documentEntity, reader)
1✔
20
        if err != nil {
1✔
NEW
21
                return nil, err
×
NEW
22
        }
×
NEW
23
        return &storagepb.UploadFileResponse{
×
NEW
24
                FileId:   documentResponse.ID.String(),
×
NEW
25
                FileName: documentResponse.FileName,
×
NEW
26
        }, nil
×
27
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc