Skip to content

Commit

Permalink
Merge pull request #7 from jembi/Duplicate-CSV_FIX
Browse files Browse the repository at this point in the history
Small fix for file url
  • Loading branch information
drizzentic authored Nov 21, 2024
2 parents 3c87811 + 2498246 commit e3e5994
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/routes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ routes.post('/upload', upload.single('file'), async (req, res) => {
if (!headers) {
return res.status(400).send('Invalid CSV file format');
}
const fileUrl = saveCsvToTmp(file.buffer, file.originalname);
try {
const fileUrl = saveCsvToTmp(file.buffer, file.originalname);
const uploadResult = await uploadToMinio(fileUrl, file.originalname, bucket as string, file.mimetype);
// Clean up the temporary file
fs.unlinkSync(fileUrl);
Expand Down

0 comments on commit e3e5994

Please sign in to comment.