Problems with uploading pictures

Source: Internet
Author: User

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:

    1. 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 "/>

    2. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.