首页 > java上传图片

java上传图片

期望: 一个java web的上传图片接口,不结合jsp form表单提交
在不适用表单提交的情况下,前端使用ajax,请求后端的上传图片接口,接口将图片上传到服务器。有没有不结合jsp表单的简单的接口实现


试试webuploader这个http://fex.baidu.com/webuploader/


<form id="forminfo" action="http://.../saveSnapshot.xhtml" method="post" enctype="multipart/form-data" >
         apiName:<input id="apiName" name="apiName" value="DiskTwistApi">
         <br>
         code:<input id="code" name="code" value="+r3UghilkTSfOFLfubg==">
         <br>
         timestamp:<input id="timestamp" name="timestamp" value="">
         <br>
         signature<input id="signature" name="signature" value="">
         <br>
         sn:<input id="sn" name="sn" style="width:500px" value="AUGUST281"/> 
         <br>
         orderId:<input id="orderId" name="orderId" style="width:500px" value="8136"/> 
         <br>
         img:<input id="img" name="fileInput" type="file"/>
         <br>
         <button type="button" onclick="check()">保存</button>
    </form>

找个ajax上传插件就可以了http://www.th7.cn/web/ajax/201406/42547.shtml

【热门文章】
【热门文章】