- Copy the uploader embed code and add the script to the index.html file inside the public folder. See https://github.com/Osmos-io/uploader-example/blob/main/public/index.html
- Copy the uploader button and insert it into the component you want to embed. See https://github.com/Osmos-io/uploader-example/blob/main/src/App.tsx
- Copy the token from the snippet and paste it into the .env file's REACT_APP_UPLOADER_TOKEN environment variable. In your codebase you probably want to have
.env
in your.gitignore
but we've committed it here as an example. See https://github.com/Osmos-io/uploader-example/blob/main/.env - Inside the component, use process.env.REACT_APP_UPLOADER_TOKEN to access the token, and inside the index.html, use "%REACT_APP_UPLOADER_TOKEN%."
- For more information please visit https://docs.osmos.io/osmos-uploader/uploader-setup/webpage-integration