Skip to content

Commit

Permalink
@uppy/xhr-upload: add 'PATCH' as valid method (#5279)
Browse files Browse the repository at this point in the history
  • Loading branch information
pedantic-git authored and aduh95 committed Jun 27, 2024
1 parent 7cf5c5d commit 46fd4d7
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
16 changes: 15 additions & 1 deletion packages/@uppy/xhr-upload/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,21 @@ declare module '@uppy/core' {
export interface XhrUploadOpts<M extends Meta, B extends Body>
extends PluginOpts {
endpoint: string
method?: 'post' | 'put'
method?:
| 'GET'
| 'HEAD'
| 'POST'
| 'PUT'
| 'DELETE'
| 'OPTIONS'
| 'PATCH'
| 'delete'
| 'get'
| 'head'
| 'options'
| 'post'
| 'put'
| string
formData?: boolean
fieldName?: string
headers?:
Expand Down
16 changes: 15 additions & 1 deletion packages/@uppy/xhr-upload/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,21 @@ export interface XHRUploadOptions extends PluginOptions {
timeout?: number
responseUrlFieldName?: string
endpoint: string
method?: 'GET' | 'POST' | 'PUT' | 'HEAD' | 'get' | 'post' | 'put' | 'head'
method?:
| 'GET'
| 'HEAD'
| 'POST'
| 'PUT'
| 'DELETE'
| 'OPTIONS'
| 'PATCH'
| 'delete'
| 'get'
| 'head'
| 'options'
| 'post'
| 'put'
| string
locale?: XHRUploadLocale
responseType?: string
withCredentials?: boolean
Expand Down

0 comments on commit 46fd4d7

Please sign in to comment.