2025-03-27 15:05:14 +08:00

107 lines
7.5 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>图片上传</title>
<style type="text/css">
.tabbody { background-color: #f0f0f0; width: 960px; margin: 0 auto; }
#flash { margin: 5px; }
#upload { width: 100px; height: 30px; float: left; background: url("/content/apps/ueuploader/upload.png"); margin: 3px 6px 0 5px; cursor: pointer; }
</style>
<script type="text/javascript" src="/jquery.js"></script>
</head>
<body>
@{
//container=flashContainer
//&url=/BaiduUE/imageUp
//&ext={"param1":"value1", "param2":"value2"}
//&fileType={"description":"图片", "extension":"*.gif;*.jpeg;*.png;*.jpg"}
//&flashUrl=imageUploader.swf
//&width=608&height=272&gridWidth=121&gridHeight=120&picWidth=100&picHeight=100
//&uploadDataFieldName=upfile&picDescFieldName=pictitle&maxSize=4&compressSize=2&maxNum=32&compressSide=0&compressLength=900
int _FLASH_W = 885;
int _FLASH_H = 472;
string _FLASH_SRC = "/content/apps/ueuploader/imageUploader.swf";
string _FLASHVARS = string.Empty;
//_FLASHVARS = "container=flashContainer&amp;url=UploadImage.ashx&amp;ext=%7B%22param1%22%3A%22value1%22%2C%20%22param2%22%3A%22value2%22%7D&amp;fileType=%7B%22description%22%3A%22%E5%9B%BE%E7%89%87%22%2C%20%22extension%22%3A%22*.gif%3B*.jpeg%3B*.png%3B*.jpg%22%7D&amp;flashUrl=imageUploader.swf&amp;width=608&amp;height=272&amp;gridWidth=121&amp;gridHeight=120&amp;picWidth=100&amp;picHeight=100&amp;uploadDataFieldName=upfile&amp;picDescFieldName=pictitle&amp;maxSize=4&amp;compressSize=2&amp;maxNum=32&amp;compressSide=0&amp;compressLength=900";
//_FLASHVARS = "container=flashcontainer&amp;url=uploadimage.ashx&amp;ext=%7b%22param1%22%3a%22value1%22%2c%20%22param2%22%3a%22value2%22%7d&amp;filetype=%7b%22description%22%3a%22%e5%9b%be%e7%89%87%22%2c%20%22extension%22%3a%22*.gif%3b*.jpeg%3b*.png%3b*.jpg%22%7d&amp;flashurl=imageuploader.swf&amp;width=608&amp;height=272&amp;gridwidth=121&amp;gridheight=120&amp;picwidth=100&amp;picheight=100&amp;uploaddatafieldname=upfile&amp;picdescfieldname=pictitle&amp;maxsize=4&amp;compresssize=2&amp;maxnum=32&amp;compressside=0&amp;compresslength=900";
//_FLASHVARS = "container=flashContainer&url=/BaiduUE/imageUp&ext={\"param1\":\"value1\", \"param2\":\"value2\"}&fileType={\"description\":\"图片\", \"extension\":\"*.gif;*.jpeg;*.png;*.jpg\"}&flashUrl=imageUploader.swf&width=608&height=272&gridWidth=121&gridHeight=120&picWidth=100&picHeight=100&uploadDataFieldName=upfile&picDescFieldName=pictitle&maxSize=4&compressSize=2&maxNum=32&compressSide=0&compressLength=900";
_FLASHVARS = string.Empty;
_FLASHVARS += "container=flashContainer"; //flash容器id
_FLASHVARS += "&url=/api/upload/upimg/"; //上传处理页面的url地址/ajax/Uploader/imageUp.ashx
_FLASHVARS += "&ext={\"param1\":\"value1\", \"param2\":\"value2\"}"; //可向服务器提交的自定义参数列表
_FLASHVARS += "&fileType={\"description\":\"图片\", \"extension\":\"*.gif;*.jpeg;*.png;*.jpg\"}";//上传文件格式限制
_FLASHVARS += "&flashUrl=" + _FLASH_SRC; //上传用的flash组件地址
_FLASHVARS += "&width=" + (_FLASH_W - 1); //flash的宽度(ie需要减去容器边框)
_FLASHVARS += "&height=" + _FLASH_H; //flash的高度
_FLASHVARS += "&gridWidth=221"; // 每一个预览图片所占的宽度
_FLASHVARS += "&gridHeight=220";// 每一个预览图片所占的高度
_FLASHVARS += "&picWidth=200"; // 单张预览图片的宽度
_FLASHVARS += "&picHeight=200"; // 单张预览图片的高度
_FLASHVARS += "&uploadDataFieldName=upfile"; // POST请求中图片数据的key
_FLASHVARS += "&picDescFieldName=pictitle"; // POST请求中图片描述的key
_FLASHVARS += "&maxSize=4"; // 文件的最大体积,单位M
_FLASHVARS += "&compressSize=2"; // 上传前如果图片体积超过该值,会先压缩,单位M
_FLASHVARS += "&maxNum=32";// 单次最大可上传多少个文件
_FLASHVARS += "&compressSide=0";//等比压缩的基准0为按照最长边1为按照宽度2为按照高度
_FLASHVARS += "&compressLength=900"; //能接受的最大边长超过该值Flash会自动等比压缩
}
<div id="tabBodys" class="tabbody">
<div style="z-index: 200;" id="local" class="panel">
<div id="flashContainer">
<object id="flash" name="flash" height="@_FLASH_H" width="@_FLASH_W" codeBase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" align="middle">
<param name="_cx" value="16086">
<param name="_cy" value="7196">
<param name="wmode" value="window">
<param name="play" value="0">
<param name="loop" value="-1">
<param name="quality" value="high">
<param name="salign" value="lt">
<param name="menu" value="-1">
<param name="base" value="">
<param name="allowscriptaccess" value="">
<param name="scale" value="noscale">
<param name="devicefont" value="0">
<param name="embedmovie" value="0">
<param name="bgcolor" value="">
<param name="swremote" value="">
<param name="moviedata" value="">
<param name="seamlesstabbing" value="1">
<param name="profile" value="0">
<param name="profileaddress" value="">
<param name="profileport" value="0">
<param name="allownetworking" value="all">
<param name="allowfullscreen" value="false">
<param name="allowfullscreeninteractive" value="">
<param name="isdependent" value="0">
<param name="movie" value="@_FLASH_SRC">
<param name="src" value="@_FLASH_SRC">
<param name="flashvars" value="@_FLASHVARS">
<embed height="@_FLASH_H" width="@_FLASH_W" name="flash" type="application/x-shockwave-flash" align="middle" pluginspage="http://www.macromedia.com/go/getflashplayer" src="@_FLASH_SRC" flashvars="@_FLASHVARS" ver="10.0.0" wmode="window" errorMessage="Flash插件初始化失败请更新您的FlashPlayer版本之后重试">
</object>
</div>
<div>
<div style='float: left; margin-left: 5px; background: url("/content/apps/ueuploader/upload.png");' id="upload"></div>
</div>
</div>
<iframe style="display: none; z-index: 1;" id="maskIframe" src="about:blank" frameborder="no" scrolling="no"></iframe>
</div>
<div style="clear: both">
<hr />
result_fids<input id="result_fids" name="result_fids" type="text" style="width: 90%;" />
<br />
result_urls<input id="result_urls" name="result_urls" type="text" style="width: 90%;" />
</div>
</body>
</html>