MySQL Update large field

Source: Internet
Author: User
Tags mysql update

<input id= "Btn_sealchange"  type= "button"  value= "Change Seal" class= "Btn btn-info" onclick= " Selectseal (${seal.sealimageid}); " ><input id= "Sealinfo"  name= "file"  type= "file" onchange= "Updateseal (${seal.sealimageid});" Style= "Display: none" >function selectseal ()  {document.getelementbyid ("Sealinfo"). Click (); Function updateseal (Sealimageupdateid)  {var sealinfo = {};sealinfo.sealimageupdateid  = sealimageupdateid;$.ajaxfileupload ( {url :  ' ${pagecontext.request.contextpath}/ Seal/uploadsealinfo.do ',secureuri : false,fileelementid :  ' Sealinfo ',dataType :  ' JSON ', Data : sealinfo,success : function (data, status)  {if  (data ==   "0")  {location.reload ();}  else {alert ("Upload failed"),}},error : function (data, status, e)  {alert (e);});} @RequestMapping (value =  "Uploadsealinfo") public  @ResPonsebody string uploadsealinfo (@RequestParam (value =  "file", required =  False)  multipartfile file, @RequestParam (value =  "Sealimageupdateid")  long id, Httpservletresponse response)  {try {byte[] sealbyte = file.getbytes (); Sealinfo sealinfo = new sealinfo (); Sealinfo.setfiledata (sealbyte); sealInfo.setId (ID); This.sealService.uploadSeal (sealinfo);return  "0";}  catch  (ioexception e)  {e.printstacktrace ();return  "-1";}}  <!-- mybatis   background update blob field data  --><update id= "Updatebyprimarykeyselective"  parametertype= "Com.itrus.msign.entity.SealInfo" >update seal_info set file_data=#{ Filedata}where id = #{id,jdbctype=bigint}   </update>


MySQL Update large field

Related Article

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.