uploadify 上传文件sessionid
来源:互联网 发布:大数据培训视频 编辑:程序博客网 时间:2024/05/29 04:42
<link href="......./uploadify/css/uploadify.css" rel="stylesheet" type="text/css" media="screen"/>
<script src="....../jquery-1.7.2.js" type="text/javascript"></script>
<script src="....../uploadify/jquery.uploadify.js" type="text/javascript"></script>
//自定义样式
.my-uploadify-button{
margin-left:130px;
}
//脚本
$('#fileInput').uploadify({
debug:true, //打印测试信息
swf:'resources/js/component/uploadify/uploadify.swf',//flash插件路径
auto:false, //手动点击按钮上传
method:'post',
multi:false, //禁止多文件上传
fileSizeLimit:'100KB',
queueID:'fileQueue',//文件对列ID
fileObjName:'imgFile',//对应action,File类型变量名
fileTypeDesc:'上传文件支持的文件格式:gif,jpg,jpge,png',//上传文件格式描述
fileTypeExts:'*.gif;*.jpg;*.jpge;*.png',//上传文件格式
uploader:'submitThirdSystem.do;jsessionid=<%=sessionId%>',//上传执行action,jsessionid防止重新开session会话必须用“;”号隔开
buttonClass:'my-uploadify-button',//文件浏览样式
onUploadStart:uploadStart,
onUploadError:uploadError,
onUploadComplete:uploadComplete,
onUploadSuccess:uploadSuccess
});
function uploadStart(file){
//上传文件时传参
var name = $('#nameid').val();
var url = $('#urlid').val();
$('#fileInput').uploadify('settings','formData',{'name':name,'url':url});
}
function uploadError(file,errorCode,errorMsg,errorString){
alert(file.name+'---'+errorCode+'---'+errorMsg+'---'+errorString);
}
function uploadComplete(file){
alert(file.name+"finishing");
}
function uploadSuccess(file,data,response){
alert(file.name+"success");
}
//点击按钮执行上传
function myUpload(){
$('#fileInput').uploadify('upload','*');
}
jsp页面
<p>
<label>图片链接:</label>
<div id="fileQueue" class="fileQueue"></div>
<input id="fileInput" type="file" name="imgFile"/>
</p>
<button onclick="myUpload()">保存</button>
- uploadify 上传文件sessionid
- uploadify批量上传文件
- jquery uploadify 上传文件
- uploadify实现文件上传
- uploadify批量上传文件
- 文件上传[Uploadify]
- uploadify多文件上传
- 使用uploadify上传文件
- uploadify 文件上传 struts2
- uploadify上传文件
- uploadify 上传大文件
- uploadify上传文件功能
- uploadify多文件上传
- uploadify上传文件
- uploadify文件上传整理
- SpringMVC+uploadify文件上传
- 使用uploadify上传文件
- uploadify多文件上传
- School idol project
- Gradle Plugin Samples (一)
- mongodb的增删查改等常用操作
- QT学习之类型转换,char*,QString,int,QByteArray之间的转换。
- xcode中代码片段的制作
- uploadify 上传文件sessionid
- 并行实验总结
- python 发邮件。可以带附件列表
- Instruments概览
- 设置button字体颜色和大小
- sqlserver和mysql不同之--表名的中括号
- Web Services 指南之:Web Services 的组件
- IOS 广告页(点击广告图片自动跳转到WebView)
- rqnoj 1 明明的随机数