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
I'm trying to use the local upload option but it doesn't work - I'm getting the error The "oldPath" argument must be of type string or an instance of Buffer or URL. Received undefined.
After searches, I found that the file I'm receiving in the upload method has no path property. Why it can happen and how can I fix it?
resource: { model: dmmf.modelMap.HelpRequest, client: prisma },
options: {
properties: {
image: { isVisible: false }
}
},
features: [uploadFeature({
provider: new LocalProvider({ bucket: 'public' }),
properties: {
key: 'image', // to this db field feature will safe S3 key,
mimeType: 'mimeType' // this property is important because allows to have previews,
},
validation: {
mimeTypes: ['image/png', 'image/jpg', 'image/jpeg']
}
The text was updated successfully, but these errors were encountered:
After a lot of research, I figured out that this is happening because the plugin doesn't even create the temporary file. And this happens because fastifyhas a different key in the attached files object, unlike express. I was at the beginning of development, so switching to express helped me, everything works fine on it with the same code.
I'm trying to use the local upload option but it doesn't work - I'm getting the error
The "oldPath" argument must be of type string or an instance of Buffer or URL. Received undefined
.After searches, I found that the file I'm receiving in the
upload
method has nopath
property. Why it can happen and how can I fix it?Provider:
Usage:
The text was updated successfully, but these errors were encountered: