How to get the file extension or content type from file byte array. in C#
we have a problem in our production environment that, after last production upgrade PNG files uploaded previously were saved as JPG file extension. so when i read that file i cannot set mimetype as PNG, since currently it takes from path.getextension, but this is wrong- my actual file is PNG type. this is causing issues in rendering images.
How to get the file extension or content type from file byte array. in C#