You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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);
}
The text was updated successfully, but these errors were encountered:
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);
}
The text was updated successfully, but these errors were encountered: