Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusmarminge committed Jan 25, 2024
1 parent 8d46dab commit 6444a42
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/drivers/uploadthing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export default defineDriver<UploadThingOptions>((opts) => {
return (client ??= new UTApi({
apiKey: opts.apiKey,
fetch: ofetch.native,
logLevel: "debug",
}));
};

Expand Down Expand Up @@ -64,7 +63,9 @@ export default defineDriver<UploadThingOptions>((opts) => {
getKeys() {
return getClient()
.listFiles({})
.then((res) => res.map((file) => fromUTKey(file.key) ?? file.key));
.then((res) =>
res.map((file) => fromUTKey(file.key)).filter((k): k is string => !!k)
);
},
setItem(key, value, opts) {
return getClient()
Expand Down

0 comments on commit 6444a42

Please sign in to comment.