Use the Cosmic API to add media to your Bucket. For more information on adding media, go to the media section in the docs.
Log in to your Cosmic dashboard and go to Bucket Settings > API Accesss to get your Bucket
Add Media using React Dropzone
React Dropzone is a popular file uploader on the client-side. For implementation, read the React Dropzone docs on GitHub.
View full screen / fork on StackBlitz
Go to the media section in the docs to learn more about the media model and available methods.