Skip to content

Adds file upload and download handling#41

Merged
rolandboon merged 1 commit intomainfrom
feature/uploads
Jan 25, 2026
Merged

Adds file upload and download handling#41
rolandboon merged 1 commit intomainfrom
feature/uploads

Conversation

@rolandboon
Copy link
Owner

@rolandboon rolandboon commented Jan 25, 2026

Adds support for file uploads and downloads using S3 presigned URLs.


Note

Adds a production-ready uploads module and extends OpenAPI to document binary responses.

  • New UploadsService (S3) with getSignedUploadUrl, getSignedDownloadUrl, streamFile, deleteFile; path utilities createUploadConfig, assertUploadPathOwnership; filename validators sanitizedFileName, fileNameWithExtension; exported in index.ts
  • route-helpers: support openapi.binaryResponse { contentType, description?, statusCode? } and refactor response building (default error responses + content generation)
  • Documentation: new docs/uploads/getting-started.md; OpenAPI guide updated with "Binary Responses" section and options
  • Tests added for uploads service/utilities/validators and binary response handling
  • Dependencies: add optional @aws-sdk/client-s3 and @aws-sdk/s3-request-presigner, add nanoid, bump hono

Written by Cursor Bugbot for commit f5936c8. This will update automatically on new commits. Configure here.

@codecov
Copy link

codecov bot commented Jan 25, 2026

Codecov Report

❌ Patch coverage is 98.67550% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.04%. Comparing base (6189052) to head (f5936c8).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/http/route-helpers.ts 92.30% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #41      +/-   ##
==========================================
+ Coverage   96.98%   97.04%   +0.06%     
==========================================
  Files          61       64       +3     
  Lines        3179     3319     +140     
  Branches      856      890      +34     
==========================================
+ Hits         3083     3221     +138     
- Misses         96       98       +2     
Files with missing lines Coverage Δ
src/uploads/file-upload.ts 100.00% <100.00%> (ø)
src/uploads/uploads.service.ts 100.00% <100.00%> (ø)
src/uploads/validators.ts 100.00% <100.00%> (ø)
src/http/route-helpers.ts 93.50% <92.30%> (-0.74%) ⬇️

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@rolandboon rolandboon merged commit aad71cd into main Jan 25, 2026
7 checks passed
@rolandboon rolandboon deleted the feature/uploads branch January 25, 2026 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant