简体   繁体   中英

determine if uploaded file is image on asp.net core

Hello friends I want when a photo from the view to the controller It was sent to check that there must be a photo and the malicious file has not been uploaded Just like the answers sent to this question Determine if uploaded file is image (any format) on MVC

But this is for MVC but I want for asp.net core

You can achive this using Image File Headers To Verify Image Format details . This answer will give you more details about the file header identification technique.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM