Skip to content

501 download endpoint + upload records#505

Open
mehanana wants to merge 1 commit into
devfrom
app-portal/feature/download-endpoint-and-upload-records
Open

501 download endpoint + upload records#505
mehanana wants to merge 1 commit into
devfrom
app-portal/feature/download-endpoint-and-upload-records

Conversation

@mehanana

Copy link
Copy Markdown
Contributor

Implemented download endpoint and upload records; also added auth to the GET & POST endpoints

🎫 Issue #501 .

🎨 Figma Link :

▶ Changelist:

  • Created a new uploads collection with a userId index in setup-indexes.ts
  • Implemented the GET endpoint to retrieve the url and expiration time; also added auth check (requireUser)
  • Implemented createSignedDownloadUrl to create the url
  • Implemented recordUpload to add the upload to the database & created UploadRecord type
  • Added auth check (requireUser) to POST endpoint

📝 Notes + 🚧 TODO:

  • n/a

🧪 Testing:

  • Signed in through a personal email & uploaded a file, then tested if I could call the GET endpoint successfully
  • Signed in through a different email & tried to retrieve the same uploaded file with the GET endpoint and made sure it was unsuccessful
  • Signed in as an admin & tried to retrieve the same uploaded file with the GET endpoint and made sure it was successful

🎥 Screenshots & Screencasts:

Signed in as mehana.nagarur@gmail.com, uploaded the file, and retrieved it successfully
Screenshot 2026-07-25 192823
Screenshot 2026-07-25 192709

Signed in as mehana.nagarur410@gmail.com (different user) and did not retrieve the file successfully
Screenshot 2026-07-25 192853

Signed in as mehana@hackbeanpot.com (admin) and retrieved the file successfully
Screenshot 2026-07-25 193236

Tried to retrieve a file that didn't exist
Screenshot 2026-07-25 192853

Not signed in and GET & POST endpoints did not work (403 forbidden)
Screenshot 2026-07-25 193435
Screenshot 2026-07-25 193616

Verified the uploaded file was in the upload collection:
Screenshot 2026-07-25 194102

…me, and added auth checks for POST & GET endpoints
@vercel

vercel Bot commented Jul 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
core-live Ready Ready Preview, Comment Jul 26, 2026 12:58am
core-main Ready Ready Preview, Comment Jul 26, 2026 12:58am

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