Requirements : restrict users to upload file format only bmp format
But now a user suffix a non- image format and then upload the file to bmp
How can I limit this operation . java reflection technology can achieve ? some sites when uploading files will first determine whether the document it is safe is how to achieve (with time xxx upload interface antivirus company Avira ? ? ? ? ? ? ? )
idiot expert Pat
------ Solution ------------------------- -------------------
....... good simply packaged into the virus but also to bmp uploaded . virus package and bmp format is different. In many cases, only one file header I can tell you gave me is not what I want right file .
------ For reference only -------------------------------------- -
you write a program , in accordance with the format to read , if not, it does not.
generally only need to determine the file header on it.
------ For reference only -------------------------------------- -
....... good simply packaged into the virus but also to upload bmp
------ For reference only ---. ------------------------------------
....... good simply packaged into the virus but also to upload bmp . virus package and bmp format is different. In many cases, only one file header I can tell you gave me is not what I want right file .
................. seems like I was suddenly dark figure woman
------ For reference only ---- -----------------------------------
FormFile -----> getContextType returns the file types such as application / octet-stream
没有评论:
发表评论