sysFileAttachUpload.jsp 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
  2. <%@include file="/commons/include/html_doctype.html"%>
  3. <html>
  4. <head>
  5. <title>附件上传</title>
  6. </head>
  7. <style type="text/css">
  8. html, body { height:100%; }
  9. body { margin:0; padding:0; overflow:auto; text-align:center; background-color: #ffffff; }
  10. #flashContent { display:none; }
  11. </style>
  12. <%@include file="/commons/include/form.jsp" %>
  13. <script type="text/javascript" src="${ctx}/media/swf/fileUpload2/swfobject.js"></script>
  14. <script type="text/javascript">
  15. var uploadPath="${ctx}/platform/system/sysFile/fileUpload.ht;jsessionid=<%=session.getId()%>?typeId=0" ;
  16. var delPath="${ctx}/platform/system/sysFile/delByFileId.ht;jsessionid=<%=session.getId()%>" ;
  17. var atthMaxSize = "5";
  18. var sizeUnit = "MB";
  19. function initFlashUpload(){
  20. //设置swfobject对象参数
  21. var swfVersionStr = '10.0.0';
  22. var xiSwfUrlStr = '${ctx}/media/swf/fileUpload2/playerProductInstall.swf';
  23. var flashvars = {};
  24. flashvars.uploadPath=uploadPath;
  25. flashvars.delPath=delPath;
  26. flashvars.atthMaxSize = typeof this.opener.atthMaxSize!='undefined'?this.opener.atthMaxSize:atthMaxSize;
  27. var unit = this.opener.sizeUnit;
  28. flashvars.sizeUnit = typeof unit!='undefined'&&(unit=="GB"||unit=="MB"||unit=="KB")?unit:sizeUnit;
  29. var params = {};
  30. params.quality = 'high';
  31. params.bgcolor = '#ffffff';
  32. params.allowscriptaccess = 'sameDomain';
  33. params.allowfullscreen = 'true';
  34. var attributes = {};
  35. attributes.id = 'flexupload';
  36. attributes.name = 'flexupload';
  37. attributes.align = 'middle';
  38. swfobject.embedSWF('${ctx}/media/swf/fileUpload2/flexupload.swf', 'flashContent',
  39. '100%', '100%', swfVersionStr, xiSwfUrlStr, flashvars, params, attributes);
  40. swfobject.createCSS('#flashContent', 'display:block;text-align:left;');
  41. }
  42. /**
  43. * 关闭Extjs页面同时刷新GridPanel,【在flex中调用】
  44. */
  45. function winClose(obj){
  46. this.opener.returnValue.call(this, this.opener.curobj, obj.files);
  47. window.close();
  48. }
  49. $(function(){
  50. initFlashUpload();
  51. });
  52. </script>
  53. <body>
  54. <div id="flashContent" >
  55. <h1>上传控件找不到</h1>
  56. <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
  57. </div>
  58. </body>
  59. </html>