How to change the default storage provider to uploadthing.
.env.local
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.
globals.css
file to include the following:
generateUploadButton
function to create a button that will upload files to the imageUploader
endpoint.