-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Implement CDN for Image Uploads to Support Image Polls
Description
To enhance the functionality of the poll creation feature, we need to implement a Content Delivery Network (CDN) for uploading and hosting images. This will allow users to create image-based polls by uploading images seamlessly. The preferred solution is AWS S3, but Cloudinary can also be considered as an alternative.
Objective
- Allow users to upload images when creating polls.
- Store and serve images efficiently using a CDN.
- Ensure the solution is scalable, cost-effective, and secure.
Requirements
Functional Requirements
-
Image Upload:
- Users should be able to upload images from their local device or provide a URL.
- Supported image formats:
JPEG,PNG,GIF,SVG. - Maximum file size:
5MB.
-
Image Storage:
- Images should be stored in a scalable and reliable storage service (AWS S3 preferred).
- Images should be served via a CDN for fast delivery.
-
Image Poll Creation:
- Users should be able to attach uploaded images to poll options.
- Display images in the poll interface.
-
Security:
- Implement proper access controls to prevent unauthorized access to images.
- Validate image files to prevent malicious uploads.
-
Cost Optimization:
- Use efficient storage and CDN solutions to minimize costs.
Non-Functional Requirements
-
Performance:
- Image uploads should be fast and reliable.
- Images should load quickly in the poll interface.
-
Scalability:
- The solution should handle a large number of image uploads and requests.
-
Error Handling:
- Provide clear error messages for failed uploads (e.g., file size exceeded, unsupported format).
Preferred Solutions
AWS S3
- Use Amazon S3 for storing images.
- Use Amazon CloudFront as the CDN for serving images.
- Implement pre-signed URLs for secure uploads directly to S3.
Cloudinary
- Use Cloudinary for image storage, transformation, and delivery.
- Leverage Cloudinary's SDK for easy integration.
Tasks
- Research and compare AWS S3 and Cloudinary for image storage and CDN.
- Set up an AWS S3 bucket or Cloudinary account.
- Implement backend API for generating pre-signed URLs (for AWS S3) or handling uploads (for Cloudinary).
- Create a frontend component for image upload and preview.
- Integrate the image upload feature into the poll creation flow.
- Write unit and integration tests for the new feature.
- Document the implementation and usage.
Acceptance Criteria
- Users can upload images and attach them to poll options.
- Images are stored securely and served via a CDN.
- The feature works seamlessly on both desktop and mobile devices.
- Proper error handling and user feedback are implemented.
- Documentation is updated to include the new feature.
Additional Context
- This feature is part of the Image Polls initiative to enhance user engagement.
- The implementation should align with the existing architecture and coding standards.
Assignees
- Anyone from G2 or G3 groups.
Attachments
Labels
enhancementfeaturebackendfrontendAWS(orCloudinary)
JenilSavalia
Metadata
Metadata
Assignees
Labels
No labels
