Xheditor is a very good open source editor, easy to use and very powerful.
Share a Xheditor directly upload problem solving method.
First step, set parameters
Localurltest:/^https?:\ /\/[^\/]*? (hsa\.com) \//i,remoteimgsaveurl:' http://www.hsa.com/test_up.asp ',
Parameter description:
localurltest: means check if it is the address format of the site.
Remoteimgsaveurl: If the check out is not a picture of this site, then the image of the SRC attribute value will be sent to the address set by this parameter.
The second step, the service side processing picture
The following is an example of ASP code, other languages similar, as long as the receipt of image information to do processing.
<%subfolder=year (now) &month [now] &day (now) &hour (now) &minute (now) &second (now ()) "Create the name of the subfolder for the current day picture=trim (Request. Form ("URLs")) 'receive post image content picture=replace (Picture, "Data:image/png;base64,", "" ") path=subfolder& ". jpg"Xmlstr= "<data>" &picture& "</data>"Dim xml:set XML=server.createobject ("MSXML2. DOMDocument ") Dim Stm:set stm=server.createobject ("ADODB. Stream ") Xml.resolveexternals=falsexml.loadxml (xmlstr) Xml.documentElement.setAttribute"Xmlns:dt", "Urn:schemas-microsoft-com:datatypes"Xml.documentElement.dataType= "Bin.base64"STM. Type=1 'adTypeBinarystm.Openstm.Write xml.documentElement.nodeTypedValuestm.SaveToFile Server.MapPath (path) STM. CloseSet xml=nothingset stm=nothingresponse.write ("http://www.huhangfei.com/" &path)%>
After processing succeeds, the address of the picture is returned, and Xheditor automatically replaces the address in the editor with the returned picture address.
Xheditor Editor upload image crawl remote picture code