Skip to content

Commit

Permalink
fix(src/gdrive.ts): fix filename to upload
Browse files Browse the repository at this point in the history
  • Loading branch information
risu729 committed Jan 16, 2024
1 parent 512f937 commit fd854b7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/gdrive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,8 @@ export const uploadFile = async (
requestBody: {
// remove extension if converting
name:
fileBasename ?? basename(path, extname(path)) + convertTo
? ""
: extname(path),
(fileBasename ?? basename(path, extname(path))) +
(convertTo ? "" : extname(path)),
...(parentFolderId ? { parents: [parentFolderId] } : {}),
...(convertTo ? { mimeType: convertTo } : {}),
},
Expand Down

0 comments on commit fd854b7

Please sign in to comment.