harshmangalam / hydrogen-solidjs-client

A social media web app powered by SolidJS
GNU General Public License v3.0
77 stars 54 forks source link

feature: File size limit for image upload (#23) #25

Closed arsen1c closed 1 year ago

arsen1c commented 1 year ago

Fixes #23

Added a file size checker in the ImageUpload component to check the file size of the image that is selected before uploading it to Cloudinary. This file size checker logic is dynamic and is based on what type of image is being uploaded. The uploading will only happen if the required file size is met. The file size limit is

About the logic

Basically, the component will look for a sizeLimit prop. The file size limit will be 2Mb if sizeLimit prop is set to extended else the file size limit will be set to 1Mb. Post, Group Post, and Cover images will have sizeLimit of extended.

Screenshots

Size limit for group image image

Size limit for cover photos image

vercel[bot] commented 1 year ago

Someone is attempting to deploy a commit to a Personal Account owned by @harshmangalam on Vercel.

@harshmangalam first needs to authorize it.