Closed wgminer closed 7 years ago
seems like it's the png file test that is failing, not your test. is it also failing locally for you?
Made a copy and paste error...should be fixed now :)
:)
I removed the file-type package entirely because the mimetype was already included in the file object.
That is the mimetype provided by the browser though, and thus can be set to anything. It's generally considered a very bad security practice to rely on that one.
multer-s3 is using the file-type package which explicitly does not support SVGs. Thus, file-type returns
null
for uploaded SVGs and they are uploaded with the defaultapplication/octet-stream
content-type (instead of the correctimage/svg+xml
). This prevents the SVGs from rendering in browsers correctly. I removed the file-type package entirely because the mimetype was already included in the file object.