Skip to content

Store Proposal Context Files and Media in Vercel Blob Storage #70

@pmora3003

Description

@pmora3003

✨ Objective

To efficiently manage large files such as PDFs, Word documents, and images associated with proposals, we need to integrate Vercel’s Blob Storage system. This will allow the platform to offload large and binary files from our server or database, improving performance, scalability, and delivery time for proposal context files.

🛠 Tasks

🔧 Backend
Integrate Vercel Blob SDK into the backend:
Install the Vercel Blob SDK.
Configure access credentials using environment variables (VERCEL_BLOB_READ_WRITE_TOKEN, etc.).

Create utility functions to:
Upload files to the blob.
Retrieve blob URLs.
Delete blobs when needed (e.g., when a proposal is removed or updated).

Modify Proposal File Upload Logic:

Update the existing proposal creation API to:
Accept file uploads (.pdf, .docx, images).
Store those files in Vercel Blob Storage.

✅ Acceptance Criteria

Proposal-related files (context documents and media) are uploaded and stored in Vercel Blob.

Blob URLs are stored in the database and accessible in the proposal UI.

Old file handling logic (local storage) is removed or deprecated.

Uploaded files are reliably accessible and fast to load/download.

📦 Resources

Vercel Blob Docs: https://vercel.com/docs/vercel-blob

Proposal Backend Endpoint: Backend/routes/proposal.js

Proposal Frontend Page: Frontend/app/admin/create-proposal/page.tsx

Proposal Viewer: Frontend/app/vote/[id]/page.tsx

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestonlydust-waveContribute to awesome OSS repos during OnlyDust's open source week

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions