Skip to content

App portal/feature/upload url endpoint#494

Open
mehanana wants to merge 5 commits into
devfrom
app-portal/feature/upload-url-endpoint
Open

App portal/feature/upload url endpoint#494
mehanana wants to merge 5 commits into
devfrom
app-portal/feature/upload-url-endpoint

Conversation

@mehanana

@mehanana mehanana commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

POST /api/v1/uploads/sign returns a real signed GCS URL. The frontend component can now PUT files directly to GCS.

🎫 Issue #484

🎨 Figma Link :

▶ Changelist:

  • create gcs singleton & export the getBucket function, which returns the prod or test bucket
  • Validate the upload request & sanitize file name
  • POST -> create signed upload url
  • PUT -> puts the url into GCS

🧪 Testing:

  • End-to-end through curl
  • Tested on http://localhost:3000/uploads-demo to see if frontend to backend was working
  • Tested bad pathways as well to make sure errors were showing up

🎥 Screenshots & Screencasts:

POST response contains a uploadUrl, uploadId, and expiresAt:
Screenshot 2026-06-28 235916

PUT a real file to the prev uploadUrl -> 200 response:
Screenshot 2026-06-29 000607
In the GCS console:
Screenshot 2026-07-08 130055

PUT bad MIME type -> 400 response:
Screenshot 2026-06-29 234014

PUT oversize file -> 400 response:
Screenshot 2026-06-29 234105

PUT malicious filename -> sanitizer strips the path components and the request succeeds with a safe filename:
Screenshot 2026-06-29 234151

Go through frontend & upload file -> 200 response & file in GCS:
Screenshot 2026-07-08 131616
Screenshot 2026-07-08 131637

@vercel

vercel Bot commented Jul 8, 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 8, 2026 5:57pm
core-main Ready Ready Preview, Comment Jul 8, 2026 5:57pm

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