Skip to content

feat-POST /uploads/:fileId/complete — confirm + verify#259

Open
muhsar27 wants to merge 1 commit into
codebestia:mainfrom
muhsar27:feat-POST-/uploads/fieId/complete-confirm-+-verify
Open

feat-POST /uploads/:fileId/complete — confirm + verify#259
muhsar27 wants to merge 1 commit into
codebestia:mainfrom
muhsar27:feat-POST-/uploads/fieId/complete-confirm-+-verify

Conversation

@muhsar27

Copy link
Copy Markdown

Closes #227

Description

This PR introduces the backend file upload confirmation and verification flow.

  • Upload URLs: Added an endpoint (POST /uploads) to request a presigned URL and generate a pending file record in the database.
  • Verification: Added POST /uploads/:id/complete for the client to confirm an upload. The server verifies the object's presence and ContentLength in S3 against the expected size before marking the file as ready. If there's a size or hash mismatch, a 400 error is returned and the file remains pending.
  • Garbage Collection: Implemented a background task that periodically sweeps and garbage collects unconfirmed pending files that are older than 1 hour.
  • Messaging Integration: Enforced that messages can only reference fileIds that have been verified and marked as ready.

Type of change

  • Bug fix
  • New feature
  • Documentation update
  • Other

Checklist

  • I have read the contributing guidelines
  • I have tested my changes locally
  • My code follows the project's coding standards

@drips-wave

drips-wave Bot commented Jun 28, 2026

Copy link
Copy Markdown

@muhsar27 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

POST /uploads/:fileId/complete — confirm + verify

1 participant