pinata/react package which comes with a hook you can use to upload files and a convert helper function for converting CIDs into IPFS Gateway URLs.
Installation
Install the Pinata SDKUsage
Import at the top of your desired page or componentKeep in mind that states like
pause, resume, or progress are only available on files over 100MB that automatically engage resumable uploads through TUS.useUpload
upload method like so.
UploadOptions that can be passed into upload
uploadResponse will contain either the full upload response or just the CID if your file was over 100MB and utilized TUS resumable uploads.
The convert helper can be used to turn a CID into a URL like so:
useUpload hook with progress and abilities to pause and resume the upload.