Skip to content

Commit

Permalink
Fix file upload
Browse files Browse the repository at this point in the history
  • Loading branch information
hardillb committed Aug 27, 2024
1 parent a01a630 commit 3f2be7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/files/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const filesInterface = (app, settings) => {
reply.status(500).send()
}
} else if (request.get('content-type').startsWith('multipart/form-data')) {
const dirname = basename(startPath)
const targetDir = dirname(startPath)

Check failure on line 95 in lib/files/index.js

View workflow job for this annotation

GitHub Actions / build / Build on 18

'targetDir' is assigned a value but never used
if (existsSync(dirname)) {
await writeFile(startPath, request.file.buffer)
reply.status(201).send()
Expand Down

0 comments on commit 3f2be7b

Please sign in to comment.