Are 3d files supported?

Hello there! I'm considering using this platform for a project that requires 3d files uploads, is it possible to upload .fbx or .obj files? Thanks!
1 Reply
Sturlen
Sturlen5mo ago
Using the "blob" filetype in your FileRouter lets you upload any file type, including .fbx and .obj.
export const ourFileRouter = {
// Define as many FileRoutes as you like, each with a unique routeSlug
imageUploader: f({ blob: { maxFileSize: "4MB" } })
export const ourFileRouter = {
// Define as many FileRoutes as you like, each with a unique routeSlug
imageUploader: f({ blob: { maxFileSize: "4MB" } })
You could filter by specific MIME-types, but I don't think fbx files has one. This means you would be limited to only uploading .obj files. example:
export const ourFileRouter = {
// Define as many FileRoutes as you like, each with a unique routeSlug
imageUploader: f({ "model/obj": { maxFileSize: "4MB" } })
export const ourFileRouter = {
// Define as many FileRoutes as you like, each with a unique routeSlug
imageUploader: f({ "model/obj": { maxFileSize: "4MB" } })
You can find the full example code in the docs: https://docs.uploadthing.com/getting-started/appdir#creating-your-first-fileroute (I don't know what framework you use, so I just used next.js as template)
Next.js App Router Setup – uploadthing
Docs for the best file uploader to date