dmitriy-nz / nestjs-form-data

NestJS middleware for handling multipart/form-data, which is primarily used for uploading files.
https://www.npmjs.com/package/nestjs-form-data
MIT License
117 stars 23 forks source link

mimetype problem #32

Closed eroo36 closed 1 year ago

eroo36 commented 1 year ago

I was not able to import "FileSystemStoredFile" for some reason (might be something about my machine only) After the last update, I cannot get the mime type using "mimetype" parameter from a "StoredFile". This is what I get when I console log :

{
  originalName: 'tst.png',
  encoding: '7bit',
  busBoyMimeType: 'image/png',
  path: '/path-to-file/tst-8a5935.png',
  size: 77290,
  fileType: { ext: 'png', mime: 'image/png' }
}

These are the options I have, but mimeType and mimetype are undefined:

Screenshot 2022-09-07 at 12 07 04

am i doing something wrong here?

Screenshot 2022-09-07 at 12 10 32

For now i am gonna stick with older version

dmitriy-nz commented 1 year ago

Hi! I will check it soon, thanks for the feedback

dmitriy-nz commented 1 year ago

@eroo36 I checked your scenario and everything works fine

FileSystemStoredFile success imported: image And IDE shows valid fields image image

dmitriy-nz commented 1 year ago

Please provide your controller, dto and package.json or nestjs version Or check your environment.

I released v1.8.1 with small fixes, you can try new version

eroo36 commented 1 year ago

Please provide your controller, dto and package.json or nestjs version Or check your environment.

I released v1.8.1 with small fixes, you can try new version

Thanks, I will try the new version, can close this if it was already working for you.

justiniruuza commented 1 year ago

I have the same issue with the latest version 1.8.3

image

justiniruuza commented 1 year ago

The weird thing, I have another project with the same version but it works well. I'm not sure how can I debug this to find where the issue