Skip to content

Commit

Permalink
fix: Fixed example in README.md
Browse files Browse the repository at this point in the history
Most likely the intent of this lambda was to return an object, and not to have a code-block with labels.
  • Loading branch information
ArtemLavrentii authored Jul 4, 2021
1 parent af0cdf8 commit f8d8920
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 @@ -507,7 +507,7 @@ You can also specify uploading options to multer this way:

```typescript
// to keep code clean better to extract this function into separate file
export const fileUploadOptions = () => {
export const fileUploadOptions = () => ({
storage: multer.diskStorage({
destination: (req: any, file: any, cb: any) => { ...
},
Expand All @@ -520,7 +520,7 @@ export const fileUploadOptions = () => {
fieldNameSize: 255,
fileSize: 1024 * 1024 * 2
}
};
});

// use options this way:
@Post("/files")
Expand Down

0 comments on commit f8d8920

Please sign in to comment.