Closed derMani closed 7 years ago
Fixed in 280c04376995274689008945b9fb1b56c9e34682, I'll be publishing 0.12.0
to NPM shortly.
You can now use the ignore
setting to disable the file extension check. Simply using 'ignore: true` in your example should do the trick.
Scenario:
Image files are uploaded by users (for example with MULTER).
Situation:
After the upload, file names are obfuscated for security reasons. A file
myBeautifulImage.jpg
might be renamed to
6724dc10ee5cc720df7535d814f2945c
Problem
Node-thumbnail expects a file extension. With the file name above, thumbnails cannot be created
The file on the file system is clearly an image (see terminal command file)
Expected behavior
Thumbnails should also be created for files, which have no file extensions. The image type should be identified by the header of the file, not by the name of the extension.
How to test
Put a PNG file with the file name 6724dc10ee5cc720df7535d814f2945c into the directory, which is defined in the variable uploadPath.
Regards
derMani