mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 12:14:41 +01:00
13 lines
445 B
TypeScript
13 lines
445 B
TypeScript
export default eventHandler(async (event) => {
|
|
return hubBlob().handleUpload(event, {
|
|
formKey: 'files', // read file or files form the `formKey` field of request body (body should be a `FormData` object)
|
|
multiple: true, // when `true`, the `formKey` field will be an array of `Blob` objects
|
|
ensure: {
|
|
types: ['image/jpeg', 'image/png'] // allowed types of the file
|
|
},
|
|
put: {
|
|
addRandomSuffix: true
|
|
}
|
|
})
|
|
})
|