Skip to content

Commit

Permalink
fix(tasks): fix file names for dropbox
Browse files Browse the repository at this point in the history
  • Loading branch information
Snazzah committed Feb 3, 2024
1 parent 2375b70 commit 362db31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/tasks/src/queries/driveUpload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ export async function driveUpload({
const fileSize = (await fs.stat(tempFile)).size;
const readStream = createReadStream(tempFile);
const file: DropboxResponse<files.FileMetadata> = fileSize < DROPBOX_UPLOAD_FILE_SIZE_LIMIT

Check warning on line 388 in apps/tasks/src/queries/driveUpload.ts

View workflow job for this annotation

GitHub Actions / Lint source code

Insert `⏎·········`
? await dbx.filesUpload({path: '/' + fileName, autorename: true, contents: readStream })
? await dbx.filesUpload({path: `/${fileName}.${ext}`, autorename: true, contents: readStream })

Check warning on line 389 in apps/tasks/src/queries/driveUpload.ts

View workflow job for this annotation

GitHub Actions / Lint source code

Replace `········?·await·dbx.filesUpload({` with `············?·await·dbx.filesUpload({·`
: await new Promise((resolve, reject) => {

Check warning on line 390 in apps/tasks/src/queries/driveUpload.ts

View workflow job for this annotation

GitHub Actions / Lint source code

Replace `········` with `············`
let sessionId = '';

Check warning on line 391 in apps/tasks/src/queries/driveUpload.ts

View workflow job for this annotation

GitHub Actions / Lint source code

Insert `····`
let uploadedBytes = 0;

Check warning on line 392 in apps/tasks/src/queries/driveUpload.ts

View workflow job for this annotation

GitHub Actions / Lint source code

Replace `············` with `················`
Expand All @@ -411,7 +411,7 @@ export async function driveUpload({
} else if (finished) {
const file = await dbx.filesUploadSessionFinish({
cursor: { session_id: sessionId, offset: uploadedBytes },
commit: { path: '/' + fileName, autorename: true },
commit: { path: `/${fileName}.${ext}`, autorename: true },
contents: chunkBuffer
});
return resolve(file);
Expand Down

0 comments on commit 362db31

Please sign in to comment.