How to change the default storage provider to uploadthing.
BLOB_READ_WRITE_TOKEN
with UPLOADTHING_TOKEN
in the packages/env/index.ts
file.
index.ts
and client.ts
to use the new uploadthing
packages:
lib
directory to define the file router. This file will be used to define the file routes for your app, using your Auth package to get the current user.
api
directory to handle the file routes.
StorageSSRPlugin
. This will add SSR hydration and avoid a loading state on your upload button.
withStorage
function. This will add the necessary classes to your upload button.
generateUploadButton
function to create a button that will upload files to the imageUploader
endpoint.