Skip to content

Commit

Permalink
fix(handleUpload): ensure valid http method (#148)
Browse files Browse the repository at this point in the history
Co-authored-by: Sébastien Chopin <seb@nuxt.com>
  • Loading branch information
farnabaz and atinux authored Jun 6, 2024
1 parent e9b239a commit 24167a3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/runtime/server/utils/blob.ts
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,8 @@ export function hubBlob(): HubBlob {
return mapR2MpuToBlobMpu(mpu)
},
async handleUpload(event: H3Event, options: BlobUploadOptions = {}) {
assertMethod(event, ['POST', 'PUT', 'PATCH'])

options = defu(options, {
formKey: 'files',
multiple: true
Expand Down

0 comments on commit 24167a3

Please sign in to comment.