Today, when using the SSM framework for uploading pictures, I met a question:
650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M00/A4/A6/wKioL1mvUALhJpsXAAGUZ3NP-TU727.png-wh_500x0-wm_ 3-wmp_4-s_206549125.png "title=" capture. PNG "alt=" Wkiol1mvualhjpsxaaguz3np-tu727.png-wh_50 "/>
Later check found is missing in the SPRINGMVC configuration file on the image upload configuration file
650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M01/05/F6/wKiom1mvUO-B0AibAADgqI4Wazo833.png-wh_500x0-wm_ 3-wmp_4-s_936553044.png "title=" capture. PNG "alt=" Wkiom1mvuo-b0aibaadgqi4wazo833.png-wh_50 "/>
Put the above <bean> configuration is OK;
By the way, summarize:
There are only three things to remember when uploading pictures:
Front page: (1) to use POST request; (2) Don't forget to add enctype= "Multipart/form-data" to the form form
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M01/05/F6/wKiom1mvUe7BXryAAABFBT0YmvU171.png-wh_500x0-wm_ 3-wmp_4-s_4238865090.png "title=" capture. PNG "alt=" Wkiom1mvue7bxryaaabfbt0ymvu171.png-wh_50 "/>
Background controller layer to write this:
650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M00/05/F6/wKiom1mvUk6TSklOAAEWzHJXR5o979.png-wh_500x0-wm_ 3-wmp_4-s_4218534918.png "title=" capture. PNG "alt=" Wkiom1mvuk6tskloaaewzhjxr5o979.png-wh_50 "/>
3. If the above code is not a problem, check the SPRINGMVC configuration file;
This article is from the "13132162" blog, please be sure to keep this source http://13142162.blog.51cto.com/13132162/1963003
Problems with uploading pictures