Minor Changes
-
#705
a919d5a
Thanks @juliusmarminge! - feat: add client headers optionthis primarily allows you to authenticate the client when your server is deployed separate from your client:
import { useUploadThing, UploadButton } from "~/utils/uploadthing"; // Using hook const { startUpload } = useUploadThing("endpoint", { headers: async () => { const token = await getToken(); return { Authorization: `Bearer ${token}` }; }, }); // Using components <UploadButton endpoint="endpoint" headers={async () => { const token = await getToken(); return { Authorization: `Bearer ${token}`, }; }} />;
Patch Changes
- #684
58e5944
Thanks @markflorkowski! - fix(button): Remove extra tabindex on button