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
`Can not intercept field "${fieldName}". Did you specify the correct field name in @GCloudStorageFileInterceptor('${fieldName}')?`,
);
return;
}
I think the line const file = request[fieldName]; is incorrect, as according to multer docs:
Multer adds a body object and a file or files object to the request object
But the interceptor tries to access a property of the request object based on the provided fieldName parameter.
So GCloudStorageFileInterceptor('file') works, but everything else won't.
The text was updated successfully, but these errors were encountered:
Hi. It seems that custom field names don't work correctly with the interceptors. For example:
This will always result in the error
The error originates from here:
nestjs-gcloud-storage/lib/gcloud-stroage-file.interceptor.ts
Lines 26 to 34 in 42fe011
I think the line
const file = request[fieldName];
is incorrect, as according to multer docs:body
object and afile
orfiles
object to therequest
objectBut the interceptor tries to access a property of the
request
object based on the providedfieldName
parameter.So
GCloudStorageFileInterceptor('file')
works, but everything else won't.The text was updated successfully, but these errors were encountered: