-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
If you want to resize the file before the upload, you can pass on the resize property as follows:
@post('upload')
@UseInterceptors(
GCloudStorageFileInterceptor('file', {
resize: { width: 500, height: 400 },
}),
)
uploadFile(@uploadedfile() file) {
console.log(file);
}
You can pass an array of size options to resize a single image into different sizes as follows:
@post('upload')
@UseInterceptors(
GCloudStorageFileInterceptor('file', {
resizeMultiple: [
{ suffix: 'sm', width: 200, height: 200 },
{ suffix: 'md', width: 300, height: 300 },
{ suffix: 'lg', width: 400, height: 400 },
],
}
)
uploadFile(@uploadedfile() file) {
console.log(file);
}
Metadata
Metadata
Assignees
Labels
No labels