Describe the feature you'd like to request
Making custom upload buttons is too hard
Describe the solution you'd like to see
// inferred input off useUploadThing
type Input = Parameters<typeof useUploadThing>;
const useUploadThingInputProps = (...args: Input) => {
const $ut = useUploadThing(...args);
const handleChange = async (e: React.ChangeEvent<HTMLInputElement>) => {
if (!e.target.files) return;
const selectedFiles = Array.from(e.target.files);
const result = await $ut.startUpload(selectedFiles);
};
return {
inputProps: {
handleChange,
multiple: ($ut.permittedFileInfo?.config?.image?.maxFileCount ?? 1) > 1,
accept: generateMimeTypes(fileTypes ?? [])?.join(", "),
},
isUploading: $ut.isUploading,
};
};
Can I have this pls <3
Additional information
No response
👨👧👦 Contributing
Describe the feature you'd like to request
Making custom upload buttons is too hard
Describe the solution you'd like to see
Can I have this pls <3
Additional information
No response
👨👧👦 Contributing