Uploading files remain in the uploading state.

Hello, I am really confused why all of my uploads are in the upload state. Is there another way to attach the files I wish to upload to uploadThing?
const customId = uuidv4();

const fileData = {
files: [
{
name: file.name,
size: file.size,
type: file.type,
customId: customId,
},
],
acl: "public-read",
metadata: null,
contentDisposition: "inline",
};

try {
const response = await fetch("https://uploadthing.com/api/uploadFiles", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-Uploadthing-Api-Key": "sk_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"X-Uploadthing-Be-Adapter": "express",
"X-Uploadthing-Fe-Package": "@uploadthing/react",
"X-Uploadthing-Version": "6.4.0",
},
body: JSON.stringify(fileData),
});
const customId = uuidv4();

const fileData = {
files: [
{
name: file.name,
size: file.size,
type: file.type,
customId: customId,
},
],
acl: "public-read",
metadata: null,
contentDisposition: "inline",
};

try {
const response = await fetch("https://uploadthing.com/api/uploadFiles", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-Uploadthing-Api-Key": "sk_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"X-Uploadthing-Be-Adapter": "express",
"X-Uploadthing-Fe-Package": "@uploadthing/react",
"X-Uploadthing-Version": "6.4.0",
},
body: JSON.stringify(fileData),
});
1 Reply
Marc
Marc5mo ago
ok i gave up, i dont like using svelte kit and now im back to s3
Want results from more Discord servers?
Add your server