Skip to content

Commit 2feaa38

Browse files
committed
@tus/server: fix type/docs of onUploadCreate
Closes #745
1 parent c030d4a commit 2feaa38

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

packages/server/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ finished uploads. (`boolean`)
159159
#### `options.onUploadCreate`
160160

161161
`onUploadCreate` will be invoked before a new upload is created.
162-
(`(req, res, upload) => Promise<{ metadata?: Record<string, string>}>`).
162+
(`(req, upload) => Promise<{ metadata?: Record<string, string>}>`).
163163

164164
- If the function returns the (modified) response the upload will be created.
165165
- You can optionally return `metadata` which will merge `upload.metadata`.

packages/server/src/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ export type ServerOptions = {
9797
* (or their fallbacks) will be sent to the client. This can be used to implement validation of upload
9898
* metadata or add headers.
9999
* @param req - The incoming HTTP request.
100-
* @param res - The HTTP response.
101100
* @param upload - The Upload object.
102101
*/
103102
onUploadCreate?: (

0 commit comments

Comments
 (0)