Skip to content

Conversation

@ycdzj
Copy link
Contributor

@ycdzj ycdzj commented Nov 7, 2025

  • refactor(files): add metadata headers
  • refactor(files): use PostObject

Copilot AI review requested due to automatic review settings November 7, 2025 08:35
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for S3 presigned POST form uploads, enabling direct browser-to-S3 file uploads with size validation. The changes introduce a new upload mechanism alongside the existing presigned URL approach.

  • Adds AWS SDK S3 client packages for presigned POST generation
  • Implements file size validation with configurable limits
  • Extends file creation API to return both presigned URL and POST form data

Reviewed Changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
package.json Adds three AWS SDK S3 packages for client, presigned post, and request presigner functionality
pnpm-lock.yaml Lock file updates for AWS SDK S3 dependencies
src/files/files.service.ts Implements S3Client initialization, adds generatePostForm method with size validation
src/namespace-resources/namespace-resources.service.ts Updates createFile to generate and return POST form data
src/namespace-resources/dto/file-info.dto.ts Adds postUrl and postFields properties to DTO, imports Record type
src/namespace-resources/dto/create-file-req.dto.ts Adds size field with validation constraints
src/i18n/en/resource.json Adds "File is too large" error message
src/i18n/zh/resource.json Adds Chinese translation for file size error
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@LucienShui LucienShui merged commit 99457d2 into main Nov 7, 2025
5 checks passed
@LucienShui LucienShui deleted the refactor/upload branch November 7, 2025 12:45
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.

3 participants