File Upload
No content installed
Description
Install the file upload Block to upload media to your Cosmic Bucket. Uses React Dropzone and React Server Actions and does not expose your Cosmic API keys to the client.
Follow the steps below to install this Block. Make sure you have reviewed the getting started steps.
This will add the FileUpload.tsx file to your blocks folder located in cosmic/blocks/file-upload.
Configure the component to do something with the response using the onComplete function. Additional props are available for autoUpload, accept,maxSize, and maxFiles. Go to the React Dropzone docs to see more customizations.
Add the <Form> component to any page that needs a file upload. This example adds the component to the homepage at app/page.tsx.
More to explore
Landing Page
1 Object type • 1 demo Object
Layout
2 Object types • 3 demo Objects
Blog
3 Object types • 2 demo Objects
Comments
1 Object type • 5 demo Objects
Contact Form
1 Object type
Events
1 Object type • 3 demo Objects
Ecommerce
1 Object type • 4 demo Objects
Videos
3 Object types • 9 demo Objects
Team
1 Object type • 4 demo Objects
Testimonials
1 Object type • 4 demo Objects
FAQs
1 Metafield
Image Gallery
1 Metafield
Navigation Menu
1 Object type • 2 demo Objects
SEO Fields
1 Metafield
Pagination
No content installed
Localization
No content installed
File Upload
No content installed
User Management
1 Object type