UTApi - server SDK uploadFilesFromUrl module error

I am getting a weird bug when uploading images using the utapi uploadFilesFromUrl. This is my server code for now, which is very similar to the one posted in the example. I am using bun, elysia, and the code is written in TypeScript.
const urlExample = "https://cdn2.hubspot.net/hubfs/53/image8-2.jpg";
utapi.uploadFilesFromUrl( urlExample);
const urlExample = "https://cdn2.hubspot.net/hubfs/53/image8-2.jpg";
utapi.uploadFilesFromUrl( urlExample);
error in the module:
1006 | ...options,
1007 | type: options?.type ?? (lookup(name) || undefined),
1008 | lastModified: options?.lastModified ?? Date.now()
1009 | };
1010 | super(parts, optionsWithDefaults);
1011 | this.name = name;
^
TypeError: Attempted to assign to readonly property.
at new UTFile (/mypath/node_modules/uploadthing/server/index.js:1011:9)
at /mypath/node_modules/uploadthing/server/index.js:1238:20
1006 | ...options,
1007 | type: options?.type ?? (lookup(name) || undefined),
1008 | lastModified: options?.lastModified ?? Date.now()
1009 | };
1010 | super(parts, optionsWithDefaults);
1011 | this.name = name;
^
TypeError: Attempted to assign to readonly property.
at new UTFile (/mypath/node_modules/uploadthing/server/index.js:1011:9)
at /mypath/node_modules/uploadthing/server/index.js:1238:20
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server