utkarsh-1602 / ecommerce-admin

This repository provides a comprehensive solution for managing billboards, categories, and products, allowing you to create a customized online shopping experience similar to Shopify. With intuitive features, you can effortlessly design and organize your store as well.
https://ecommerce-admin-mauve-psi.vercel.app
MIT License
2 stars 0 forks source link

functionality: upload background image to billboard #33

Closed utkarsh-1602 closed 11 months ago

utkarsh-1602 commented 11 months ago

Worked on functionality to upload the background image to cloudinary (cloud storage) in Create Biillboard page

Code to Upload Image :

            <CldUploadWidget onUpload={onUpload} uploadPreset="zc0htntw">
                {({ open }) => {
                    const onClick = () => {
                        open()
                    }

                    return (
                        <Button
                            type="button"
                            disabled={disabled}
                            variant="secondary"
                            onClick={onClick}
                        >
                            <ImagePlusIcon className="h-4 w-4 mr-2" />
                            Upload an Image
                        </Button>
                    )
                }}
            </CldUploadWidget>