Skip to content

Commit d9b51b9

Browse files
farnabazatinux
andauthored
fix(handleUpload): ensure valid http method (nuxt-hub#148)
Co-authored-by: Sébastien Chopin <[email protected]>
1 parent 4fb2225 commit d9b51b9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/runtime/server/utils/blob.ts

+2
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,8 @@ export function hubBlob(): HubBlob {
398398
return mapR2MpuToBlobMpu(mpu)
399399
},
400400
async handleUpload(event: H3Event, options: BlobUploadOptions = {}) {
401+
assertMethod(event, ['POST', 'PUT', 'PATCH'])
402+
401403
options = defu(options, {
402404
formKey: 'files',
403405
multiple: true

0 commit comments

Comments
 (0)