Skip to content

Commit

Permalink
fix: Typo into Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinbalicot committed Feb 29, 2024
1 parent 94e1086 commit fe60485
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const server = createServer(app)

app.use(bodyParser())

app.get('/', (req, res) => {
app.get('/', ({ res }) => {
res.set('Content-Type', 'text/html; charset=utf-8')
.send(`
<form action="/file" method="post" enctype="multipart/form-data">
Expand All @@ -33,7 +33,7 @@ app.get('/', (req, res) => {
`)
})

app.post('/file', (req, res) => {
app.post('/file', ({ req, res }) => {
const file = req.body.file // file sent with name "file"
res.sendFile(file.filepath, file.filename, file.mimetype)
})
Expand Down

0 comments on commit fe60485

Please sign in to comment.