Daniel J. Lewis
Daniel J. Lewis
TTCTheo's Typesafe Cult
Created by Diversified on 12/21/2023 in #questions
How to delete files in UploadThing?
This seems to be the clunky way to fix it: https://github.com/pingdotgg/uploadthing/issues/213 I wanted to use Next.js because I thought I wouldn't have to make fetch calls to an internal API!
11 replies
TTCTheo's Typesafe Cult
Created by Diversified on 12/21/2023 in #questions
How to delete files in UploadThing?
I also tried adding uploadthing/server to my serverComponentsExternalPackages in Next config. But that didn't fix it.
11 replies
TTCTheo's Typesafe Cult
Created by Diversified on 12/21/2023 in #questions
How to delete files in UploadThing?
I'm having the same problem as your first post, except I'm still on Next.js 13.5.3.
11 replies
TTCTheo's Typesafe Cult
Created by Daniel J. Lewis on 12/15/2023 in #questions
Get single number from Shadcn UI slider for form?
Got it! I just need to come back to the problem with a fresh mind. The solution was simple! Replace:
onValueChange={field.onChange}
onValueChange={field.onChange}
With:
onValueChange={(v) => field.onChange(v[0])}
onValueChange={(v) => field.onChange(v[0])}
2 replies
TTCTheo's Typesafe Cult
Created by Daniel J. Lewis on 7/5/2023 in #questions
How to upload blob from audio recorder?
Well, it seems my problem isn't actually with S3 or UploadThing, it's that I can't seem to convert my blob into any other format that still yields a usable file. For example:
console.log("Raw", blob);
const blobText = await blob.text();
const blobBlob = new Blob([blobText], {
type: "audio/webm;codecs=opus",
});
console.log("Converted", blobBlob);
console.log("Raw", blob);
const blobText = await blob.text();
const blobBlob = new Blob([blobText], {
type: "audio/webm;codecs=opus",
});
console.log("Converted", blobBlob);
Returns:
Raw Blob {size: 41785, type: 'audio/webm;codecs=opus'}
Converted Blob {size: 75160, type: 'audio/webm;codecs=opus'}
Raw Blob {size: 41785, type: 'audio/webm;codecs=opus'}
Converted Blob {size: 75160, type: 'audio/webm;codecs=opus'}
I would expect the converted blob to be the same size as the original blob. I've tried some kind of base64 string, too. While that's smaller than 74 KB (like in the above example), it's still about 25% bigger and still produces an unusable blob.
5 replies