Skip to content

Commit

Permalink
chore: rename var
Browse files Browse the repository at this point in the history
  • Loading branch information
wa0x6e committed Oct 16, 2023
1 parent e530488 commit ea842f7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ router.post('/upload', async (req, res) => {
})
.webp({ lossless: true });

const payload = await fs
const buffer = await fs
.createReadStream(req.file?.path as string)
.pipe(transformer)
.toBuffer();

const result = await uploadToProviders(IMAGE_PROVIDERS, 'image', payload);
const result = await uploadToProviders(IMAGE_PROVIDERS, 'image', buffer);
const file = {
cid: result.cid,
provider: result.provider
};

try {
await setAws(result.cid, payload);
await setAws(result.cid, buffer);
} catch (e: any) {
capture(e);
}
Expand Down

0 comments on commit ea842f7

Please sign in to comment.