- 浏览: 10233059 次
- 性别:
- 来自: 深圳
博客专栏
-
Oracle基础
浏览量:462625
-
springMVC介绍
浏览量:1775522
-
Mybatis简介
浏览量:1398366
-
Spring整合JMS
浏览量:395023
-
Ehcache简介
浏览量:679990
-
Cas简介
浏览量:530894
-
Spring Securi...
浏览量:1183954
-
Spring基础知识
浏览量:467934
-
Spring Aop介绍
浏览量:151399
-
JAXB简介
浏览量:68154
文章分类
- 全部博客 (388)
- 配置文件 (2)
- dwr (2)
- 安全 (4)
- 电子邮件 (3)
- CKEDITOR (3)
- Cas (10)
- ehcache (11)
- elastic-job (5)
- extjs4 (6)
- freemarker (2)
- hibernate (5)
- itext (1)
- JasperReport (4)
- java (24)
- JAXB (9)
- jbpm4 (2)
- jfreeChart (3)
- Jms (5)
- jquery (7)
- jsp (4)
- Linux (1)
- Lucene (1)
- maven (7)
- mybatis (23)
- MySQL (6)
- nginx (2)
- oracle (29)
- poi (8)
- 日志 (1)
- redis (1)
- Servlet (5)
- 实用技巧 (5)
- Spring (70)
- SpringMVC (29)
- spring Security (20)
- struts2 (5)
- svn (1)
- Tomcat (1)
- Webservice (8)
- web前端 (5)
- Weblogic (7)
- 问题 (6)
- xml (3)
- Spring Boot (26)
- spring cloud (18)
- 面试 (1)
- RocketMQ (5)
最新评论
-
18335864773:
推荐用pageoffice 生成 word。POI处理Offi ...
POI生成Web版Word文件 -
234390216:
skran 写道大兄弟文章写的不错,排版有点问题,代码长了既没 ...
Spring Boot(05)——SpringApplication介绍 -
skran:
大兄弟文章写的不错,排版有点问题,代码长了既没换行也没滚动条
Spring Boot(05)——SpringApplication介绍 -
Caelebs:
Ehcache(04)——设置缓存的大小 -
234390216:
thaIm 写道不知道RestTemplate 默认的链接数、 ...
Spring(30)——RestTemplate介绍
uploadInput页面:
<%@ page language="java" import="java.util.*" pageEncoding="GB18030"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <base href="<%=basePath%>"> <title>上传照片</title> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="This is my page"> <!-- <link rel="stylesheet" type="text/css" href="styles.css"> --> <link href="swfupload/default.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="/tiantian/swfupload/swfupload.js"></script> <script type="text/javascript" src="/tiantian/swfupload/handlers.js"></script> <script type="text/javascript"> var swfu; window.onload = function () { swfu = new SWFUpload({ // Backend Settings upload_url: "/tiantian/picture/upload",//上传到哪个地址 post_params: {"albumId": "${album.id}"},//传过去的参数 // File Upload Settings file_size_limit : "20 MB", // 2MB file_types : "*.jpg;*.jpeg;*.gif", file_types_description : "JPG Images", file_upload_limit : 0, // Event Handler Settings - these functions as defined in Handlers.js // The handlers are not part of SWFUpload but are part of my website and control how // my website reacts to the SWFUpload events. swfupload_preload_handler : preLoad, swfupload_load_failed_handler : loadFailed, file_queue_error_handler : fileQueueError, file_dialog_complete_handler : fileDialogComplete, upload_progress_handler : uploadProgress, upload_error_handler : uploadError, upload_success_handler : uploadSuccess, upload_complete_handler : uploadComplete, // Button Settings button_image_url : "/tiantian/images/swfupload/SmallSpyGlassWithTransperancy_17x18.png", button_placeholder_id : "spanButtonPlaceholder", button_width: 180, button_height: 18, button_text : '<span class="button">Select Images <span class="buttonSmall">(2 MB Max)</span></span>', button_text_style : '.button { font-family: Helvetica, Arial, sans-serif; font-size: 12pt; } .buttonSmall { font-size: 10pt; }', button_text_top_padding: 0, button_text_left_padding: 18, button_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT, button_cursor: SWFUpload.CURSOR.HAND, // Flash Settings flash_url : "/tiantian/swfupload/swfupload.swf", flash9_url : "/tiantian/swfupload/swfupload_fp9.swf", custom_settings : { upload_target : "divFileProgressContainer" }, //Image Resize:no, // Debug Settings debug: false }); }; </script> <style type="text/css"> #tophead { text-align:left; padding-left:10px; margin-top:10px; } </style> </head> <body> <div id="tophead"> <a href="picture/index">返回相册首页</a> </div> <div id="content" style="text-align: left"> <h2>${album.name}</h2> <p>upload Images to ${album.name}</p> <form> <div style="width: 180px; height: 18px; border: solid 1px #7FAAFF; background-color: #C5D9FF; padding: 2px;"> <span id="spanButtonPlaceholder"></span> </div> </form> <div id="divFileProgressContainer" style="height: 75px;"></div> <div id="thumbnails"></div> </div> </body> </html>
上传页面用到的handler.js文件的内容:
function preLoad() { if (!this.support.loading) { alert("You need the Flash Player 9.028 or above to use SWFUpload."); return false; } } function loadFailed() { alert("Something went wrong while loading SWFUpload. If this were a real application we'd clean up and then give you an alternative"); } function fileQueueError(file, errorCode, message) { try { var imageName = "error.gif"; var errorName = ""; if (errorCode === SWFUpload.errorCode_QUEUE_LIMIT_EXCEEDED) { errorName = "You have attempted to queue too many files."; } if (errorName !== "") { alert(errorName); return; } switch (errorCode) { case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE: imageName = "zerobyte.gif"; break; case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT: imageName = "toobig.gif"; break; case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE: case SWFUpload.QUEUE_ERROR.INVALID_FILETYPE: default: alert(message); break; } addImage("images/" + imageName); } catch (ex) { this.debug(ex); } } function fileDialogComplete(numFilesSelected, numFilesQueued) { try { if (numFilesQueued > 0) { this.startResizedUpload(this.getFile(0).ID, 100, 100, SWFUpload.RESIZE_ENCODING.JPEG, 100); } } catch (ex) { this.debug(ex); } } function uploadProgress(file, bytesLoaded) { try { var percent = Math.ceil((bytesLoaded / file.size) * 100); var progress = new FileProgress(file, this.customSettings.upload_target); progress.setProgress(percent); progress.setStatus("Uploading..."); progress.toggleCancel(true, this); } catch (ex) { this.debug(ex); } } function uploadSuccess(file, serverData) { try { var progress = new FileProgress(file, this.customSettings.upload_target); if (serverData.substring(0, 7) === "FILEID:") { //把上传的照片的缩略图在页面上进行显示 addImage("picture/thumbnail/" + serverData.substring(7)); // alert(serverData.substring(7)+"hello"); progress.setStatus("Upload Complete."); progress.toggleCancel(false); } else { addImage("images/swfupload/error.gif"); progress.setStatus("Error."); progress.toggleCancel(false); alert(serverData); } } catch (ex) { this.debug(ex); } } function uploadComplete(file) { try { /* I want the next upload to continue automatically so I'll call startUpload here */ if (this.getStats().files_queued > 0) { this.startResizedUpload(this.getFile(0).ID, 500, 500, SWFUpload.RESIZE_ENCODING.JPEG, 500); } else { var progress = new FileProgress(file, this.customSettings.upload_target); progress.setComplete(); progress.setStatus("All images received."); progress.toggleCancel(false); } } catch (ex) { this.debug(ex); } } function uploadError(file, errorCode, message) { var imageName = "error.gif"; var progress; try { switch (errorCode) { case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED: try { progress = new FileProgress(file, this.customSettings.upload_target); progress.setCancelled(); progress.setStatus("Cancelled"); progress.toggleCancel(false); } catch (ex1) { this.debug(ex1); } break; case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED: try { progress = new FileProgress(file, this.customSettings.upload_target); progress.setCancelled(); progress.setStatus("Stopped"); progress.toggleCancel(true); } catch (ex2) { this.debug(ex2); } case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED: imageName = "uploadlimit.gif"; break; default: alert(message); break; } addImage("images/" + imageName); } catch (ex3) { this.debug(ex3); } } function addImage(src) { var newImg = document.createElement("img"); newImg.style.margin = "5px"; document.getElementById("thumbnails").appendChild(newImg); if (newImg.filters) { try { newImg.filters.item("DXImageTransform.Microsoft.Alpha").opacity = 0; } catch (e) { // If it is not set initially, the browser will throw an error. This will set it if it is not set yet. newImg.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity=' + 0 + ')'; } } else { newImg.style.opacity = 0; } newImg.onload = function () { fadeIn(newImg, 0); }; newImg.src = src; } function fadeIn(element, opacity) { var reduceOpacityBy = 5; var rate = 30; // 15 fps if (opacity < 100) { opacity += reduceOpacityBy; if (opacity > 100) { opacity = 100; } if (element.filters) { try { element.filters.item("DXImageTransform.Microsoft.Alpha").opacity = opacity; } catch (e) { // If it is not set initially, the browser will throw an error. This will set it if it is not set yet. element.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity=' + opacity + ')'; } } else { element.style.opacity = opacity / 100; } } if (opacity < 100) { setTimeout(function () { fadeIn(element, opacity); }, rate); } } /* ****************************************** * FileProgress Object * Control object for displaying file info * ****************************************** */ function FileProgress(file, targetID) { this.fileProgressID = "divFileProgress"; this.fileProgressWrapper = document.getElementById(this.fileProgressID); if (!this.fileProgressWrapper) { this.fileProgressWrapper = document.createElement("div"); this.fileProgressWrapper.className = "progressWrapper"; this.fileProgressWrapper.id = this.fileProgressID; this.fileProgressElement = document.createElement("div"); this.fileProgressElement.className = "progressContainer"; var progressCancel = document.createElement("a"); progressCancel.className = "progressCancel"; progressCancel.href = "#"; progressCancel.style.visibility = "hidden"; progressCancel.appendChild(document.createTextNode(" ")); var progressText = document.createElement("div"); progressText.className = "progressName"; progressText.appendChild(document.createTextNode(file.name)); var progressBar = document.createElement("div"); progressBar.className = "progressBarInProgress"; var progressStatus = document.createElement("div"); progressStatus.className = "progressBarStatus"; progressStatus.innerHTML = " "; this.fileProgressElement.appendChild(progressCancel); this.fileProgressElement.appendChild(progressText); this.fileProgressElement.appendChild(progressStatus); this.fileProgressElement.appendChild(progressBar); this.fileProgressWrapper.appendChild(this.fileProgressElement); document.getElementById(targetID).appendChild(this.fileProgressWrapper); fadeIn(this.fileProgressWrapper, 0); } else { this.fileProgressElement = this.fileProgressWrapper.firstChild; this.fileProgressElement.childNodes[1].firstChild.nodeValue = file.name; } this.height = this.fileProgressWrapper.offsetHeight; } FileProgress.prototype.setProgress = function (percentage) { this.fileProgressElement.className = "progressContainer green"; this.fileProgressElement.childNodes[3].className = "progressBarInProgress"; this.fileProgressElement.childNodes[3].style.width = percentage + "%"; }; FileProgress.prototype.setComplete = function () { this.fileProgressElement.className = "progressContainer blue"; this.fileProgressElement.childNodes[3].className = "progressBarComplete"; this.fileProgressElement.childNodes[3].style.width = ""; }; FileProgress.prototype.setError = function () { this.fileProgressElement.className = "progressContainer red"; this.fileProgressElement.childNodes[3].className = "progressBarError"; this.fileProgressElement.childNodes[3].style.width = ""; }; FileProgress.prototype.setCancelled = function () { this.fileProgressElement.className = "progressContainer"; this.fileProgressElement.childNodes[3].className = "progressBarError"; this.fileProgressElement.childNodes[3].style.width = ""; }; FileProgress.prototype.setStatus = function (status) { this.fileProgressElement.childNodes[2].innerHTML = status; }; FileProgress.prototype.toggleCancel = function (show, swfuploadInstance) { this.fileProgressElement.childNodes[0].style.visibility = show ? "visible" : "hidden"; if (swfuploadInstance) { var fileID = this.fileProgressID; this.fileProgressElement.childNodes[0].onclick = function () { swfuploadInstance.cancelUpload(fileID); return false; }; } };
后台进行处理的struts2 Action代码:
import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.OutputStream; import java.io.PrintWriter; import java.util.Date; import java.util.List; import java.util.Map; import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; import org.apache.struts2.ServletActionContext; import org.apache.struts2.interceptor.RequestAware; import org.apache.struts2.interceptor.SessionAware; import com.opensymphony.xwork2.ActionSupport; import com.tiantian.tiantian.model.Album; import com.tiantian.tiantian.model.Picture; import com.tiantian.tiantian.model.User; import com.tiantian.tiantian.service.AlbumService; import com.tiantian.tiantian.service.PictureService; import com.tiantian.tiantian.util.ImageSizer; import com.tiantian.tiantian.util.Pager; import com.tiantian.tiantian.util.Util; public class PictureAction extends ActionSupport implements RequestAware,SessionAware { /** * */ private static final long serialVersionUID = 375280356930857300L; private PictureService pictureService; private AlbumService albumService; private int offset; private int maxResults = 20; private int totalRecords; private int totalPage; private Pager<Picture> pager; private Map<String, Object> request; private Map<String, Object> session; private List<Picture> pictures; private List<Album> albums; private int albumId; private Album album; //upload private File Filedata;//swfupload上传文件的默认名称 private String FiledataFileName; private String FiledataContentType; private String albumName; private int id; private Picture pic; private String username; public String execute() { User currentUser = (User)session.get("user"); ifFirstIn(currentUser);//如果用户是第一次访问,则给ta添加一个默认的相册 if (Util.isNull(username)) username = currentUser.getUsername(); albums = albumService.find(username); return SUCCESS; } private void ifFirstIn(User currentUser) { int size = albumService.find(currentUser.getUsername()).size(); if (size == 0) { Album album = new Album(); album.setOwner(currentUser); album.setName("我的相册"); albumService.add(album); } } public String myPictures() { if (albumId > 0) { album = albumService.findById(albumId); Object obj = request.get("pager.offset"); if (obj != null) offset = (Integer)obj; pager = pictureService.find(offset, maxResults, albumId); pictures = pager.getData(); totalRecords = pager.getTotalCount(); } return "myPictures"; } public String detail() { if (id > 0) { pic = pictureService.find(id); if (pic != null) pictures = pictureService.findAll(pic.getAlbum().getId()); } return "detail"; } public String uploadInput() { if (albumId > 0) album = albumService.findById(albumId); return "uploadInput"; } public void upload() throws IOException { // System.out.println("albumId = "+albumId); if (albumId > 0) { if (Filedata != null) { User currentUser = (User)session.get("user"); Album album = albumService.findById(albumId); String path = ServletActionContext.getServletContext().getRealPath("/images/pics/"+currentUser.getUsername()+"/"+album.getId()); File dir = new File(path); if (!dir.exists()) dir.mkdirs(); String fileName = geneFileName(FiledataFileName); File dest = new File(dir,fileName); Util.upload(Filedata, dest); String picName = FiledataFileName.substring(0,FiledataFileName.lastIndexOf(".")); boolean flag = album.getPictures().size()==0; Picture pic = new Picture(); pic.setUrl(fileName); pic.setName(picName); pic.setAlbum(album); pictureService.add(pic); album.getPictures().add(pic); int id = pic.getId(); if (flag) { int index = FiledataFileName.lastIndexOf("."); String extension = FiledataFileName.substring(index+1); String faceFileName = geneFileName(FiledataFileName); String faceUrl = currentUser.getUsername()+"/"+album.getId()+"/"+geneFileName(FiledataFileName); File dest1 = new File(dir,faceFileName); ImageSizer.resize(Filedata, dest1, 200, extension); album.setFaceUrl(faceUrl); } albumService.update(album); HttpServletResponse response = ServletActionContext.getResponse(); response.setContentType("text/html;charset=utf-8"); PrintWriter out = response.getWriter(); out.print("FILEID:"+id); } } } private String geneFileName(String fileName) { int index = fileName.lastIndexOf("."); String extension = fileName.substring(index); String prefix = Util.formatDate(new Date(), "yyyyMMddHHmmss"); String name = prefix + extension; return name; } public void addAlbum() throws IOException { HttpServletResponse response = ServletActionContext.getResponse(); response.setContentType("text/html;charset=utf-8"); PrintWriter out = response.getWriter(); String outStr = "ok"; if (!Util.isNull(albumName)) { User owner = (User)session.get("user"); Album album = new Album(); album.setName(albumName); album.setOwner(owner); albumService.add(album); } else outStr = "操作失败!相册名称不能为空!"; out.write(outStr); out.flush(); out.close(); } public void delAlbum() throws IOException { HttpServletResponse response = ServletActionContext.getResponse(); response.setContentType("text/html;charset=utf-8"); PrintWriter out = response.getWriter(); String outStr = "ok"; if (albumId > 0) { album = albumService.findById(albumId); albumService.del(albumId); String path = ServletActionContext.getServletContext().getRealPath("/images/pics")+"/"+album.getOwner().getUsername()+"/"+album.getId(); File dest = new File(path); if (dest.exists()) delDerectory(dest); } else { outStr = "操作错误,删除失败!"; } out.write(outStr); out.flush(); out.close(); } private void delDerectory(File dir) { File[] files = dir.listFiles(); for (File file:files) { file.delete(); } dir.delete(); } public String thumbnail() throws IOException { if (id > 0) { pic = pictureService.find(id); String path = ServletActionContext.getServletContext().getRealPath("/images/pics")+"/"+pic.getAlbum().getOwner().getUsername()+"/"+pic.getAlbum().getId()+"/"+pic.getUrl(); FileInputStream fis = new FileInputStream(path); int len = fis.available(); byte bytes[] = new byte[len]; fis.read(bytes); fis.close(); HttpServletResponse response = ServletActionContext.getResponse(); response.setContentType("image/jpeg"); OutputStream os = response.getOutputStream(); os.write(bytes); os.flush(); os.close(); } return NONE; } public void del() throws IOException { HttpServletResponse response = ServletActionContext.getResponse(); response.setContentType("text/html"); PrintWriter out = response.getWriter(); String outStr = "ok"; if (id > 0) { Picture pic = pictureService.find(id); if (pic != null) { // pic.setAlbum(null); // pictureService.update(pic); pictureService.del(id); String path = ServletActionContext.getServletContext().getRealPath("/images/pics")+"/"+pic.getAlbum().getOwner().getUsername()+"/"+pic.getAlbum().getId()+"/"+pic.getUrl(); File dest = new File(path); if (dest.exists()) dest.delete(); } } else outStr = "操作错误,请求的内容不存在!"; out.write(outStr); out.flush(); out.close(); } public PictureService getPictureService() { return pictureService; } @Resource public void setPictureService(PictureService pictureService) { this.pictureService = pictureService; } public int getOffset() { return offset; } public void setOffset(int offset) { this.offset = offset; } public int getMaxResults() { return maxResults; } public void setMaxResults(int maxResults) { this.maxResults = maxResults; } public int getTotalRecords() { return totalRecords; } public void setTotalRecords(int totalRecords) { this.totalRecords = totalRecords; } public int getTotalPage() { return totalPage; } public void setTotalPage(int totalPage) { this.totalPage = totalPage; } public Pager<Picture> getPager() { return pager; } public void setPager(Pager<Picture> pager) { this.pager = pager; } public Map<String, Object> getRequest() { return request; } public void setRequest(Map<String, Object> request) { this.request = request; } public List<Picture> getPictures() { return pictures; } public void setPictures(List<Picture> pictures) { this.pictures = pictures; } public List<Album> getAlbums() { return albums; } public void setAlbums(List<Album> albums) { this.albums = albums; } public Map<String, Object> getSession() { return session; } public void setSession(Map<String, Object> session) { this.session = session; } public AlbumService getAlbumService() { return albumService; } @Resource public void setAlbumService(AlbumService albumService) { this.albumService = albumService; } public int getAlbumId() { return albumId; } public void setAlbumId(int albumId) { this.albumId = albumId; } public File getFiledata() { return Filedata; } public void setFiledata(File filedata) { Filedata = filedata; } public String getFiledataFileName() { return FiledataFileName; } public void setFiledataFileName(String filedataFileName) { FiledataFileName = filedataFileName; } public String getFiledataContentType() { return FiledataContentType; } public void setFiledataContentType(String filedataContentType) { FiledataContentType = filedataContentType; } public String getAlbumName() { return albumName; } public void setAlbumName(String albumName) { this.albumName = albumName; } public Album getAlbum() { return album; } public void setAlbum(Album album) { this.album = album; } public int getId() { return id; } public void setId(String id) { if (!Util.isNull(id)) { try { this.id = Integer.parseInt(id); } catch (NumberFormatException e) { } } } public Picture getPic() { return pic; } public void setPic(Picture pic) { this.pic = pic; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } }
- SWFUpload_v250_beta_3_core.zip (457.9 KB)
- 下载次数: 483
评论
2 楼
234390216
2011-10-24
this.startResizedUpload(this.getFile(0).ID, 100, 100, SWFUpload.RESIZE_ENCODING.JPEG, 100);
或许是我上述博客的49行的
public123 写道
楼主您好,为什么我上传图片,除了jpg,上传其他的图片就出现“Error generating resized image. Resizing: Error #2015”这样的错误,您能帮忙解决一下吗?
或许是我上述博客的49行的
this.startResizedUpload(this.getFile(0).ID, 100, 100, SWFUpload.RESIZE_ENCODING.JPEG, 100);这句有问题,不知道你是不是也这样写的,如果你在上传图片的时候也曾试图改变图片的大小,那就会有问题了,因为这里在改变大小的时候用的是JPEG的编码,所以你只能上传JPEG的图片,如果不改变大小就没事了,或者你就使用对应的ENCODING去改变图片的大小。
1 楼
public123
2011-10-22
楼主您好,为什么我上传图片,除了jpg,上传其他的图片就出现“Error generating resized image. Resizing: Error #2015”这样的错误,您能帮忙解决一下吗?
发表评论
-
Java Webservice指定超时时间
2017-09-25 23:28 9969Java Webservice指定超时时 ... -
为什么switch case语句需要加入break
2017-04-04 22:29 12551假设我们有如下这 ... -
Java枚举类型介绍
2016-12-05 20:40 11487简介 Java的枚举类型用于在某 ... -
Java SPI机制简介
2016-10-09 10:37 12587Java SPI机制简介 SPI ... -
HashMap、HashSet、TreeMap、TreeSet判断元素相同
2015-10-03 17:14 14770HashMap、HashSet、TreeMap、TreeS ... -
实现对properties文件的有序读写
2014-06-17 20:36 18864实现对properties文件的 ... -
压栈思想计算Java运算表达式
2013-11-27 00:02 22673栈的规则是先进后出。利用压栈的思想来计算四则运 ... -
Java Socket编程
2013-11-23 20:13 247492Java Socket编程 对于Java ... -
字符串分割,你会吗?
2013-11-21 17:08 14227对于字符串的分割主要有两种方式,使用St ... -
ubuntu在文字模式下显示中文乱码
2012-08-25 13:39 0修改/etc/default/locale中的语言为英文 -
如何正确遍历删除List中的元素,你会吗?
2012-05-11 16:22 70269遍历删除List中的元素有很多种方法,当运用不当的时 ... -
利用Java进行MySql数据库的导入和导出
2012-02-20 17:25 27484利用Java来进行Mysql数 ... -
java压缩和解压缩Zip、Jar、Gzip文件
2011-11-04 14:24 27437我们经常会使用WinZIP等压缩软件将文件进行压缩以方便传 ... -
在文件指定位置读取和写入内容RandomAccessFile
2011-11-04 13:34 27023RandomAccessFile是属于随机读取类,是可以对文件 ... -
static关键字详解——static与非static的区别
2011-10-15 16:08 12607在本篇博客中,我主要会讲两个方面的内容,第一个是实 ... -
Java改变图片的大小
2011-10-09 09:53 33813前面在做项目的时候,有一个需求是需要上传图片的,然而该图片只是 ... -
帐套管理,新建数据库,拷贝表结构和相应数据
2011-08-05 09:29 12621最近做了一个帐套管理的一个功能,需要进行帐套初始化,在初始化的 ... -
有趣的题
2011-07-11 12:04 107971.实现一个方法将一个字符串的奇数位取出,如传的是ahbhch ... -
把中文变成zhongwen
2011-07-08 16:49 11346import net.sourceforge.pinyin4j ... -
使用DecimalFormat进行数字格式化
2011-05-31 09:29 36089//获取DecimalFormat的方法DecimalForm ...
相关推荐
这个"SWFUpload批量上传图片"的项目是一个基于MyEclipse的工程实例,旨在帮助开发者理解和实现批量上传图片的功能。下面我们将深入探讨SWFUpload的工作原理、主要特性以及如何在MyEclipse环境中进行集成和应用。 一...
总的来说,"php + swfupload 实现批量上传图片实例"是一个实用的解决方案,它利用PHP的文件处理能力和SWFUpload的多文件上传功能,为用户提供了一个易于使用的批量图片上传工具。只要配置正确,这个系统可以在各种...
SwfUpload 是一款开源的JavaScript库,用于实现文件的批量上传功能。它通过Flash插件在Web页面上提供用户友好的界面,允许用户选择多个文件并一次性上传,极大地提升了文件上传的效率。在这个项目中,"完美运行"指的...
"swfupload+asp+access批量上传图片" 这个标题涉及到三个主要的技术元素。首先,"swfupload" 是一个开源的Flash上传组件,它允许用户在网页上实现文件的批量上传功能,尤其适用于处理大文件或多个文件的上传需求。...
SWFUpload是一款强大的JavaScript与Flash结合的文件上传组件,它允许用户在网页上实现批量上传图片的功能。在本文中,我们将深入探讨SWFUpload的工作原理、实现步骤以及如何在上传成功后显示缩略图,并对图片进行...
Java中的SWFUpload是一种流行的文件上传工具,尤其适用于处理图片和文件的批量上传。这个工具在Web开发中被广泛使用,因为它提供了用户友好的界面和高效的数据传输能力。SWFUpload是一个基于Flash的组件,它允许用户...
SWFUpload是一个JavaScript库,它使用Flash技术提供了一种优雅的方式来进行大文件的多文件上传,特别适合那些需要处理大量图片或文档的Web应用。以下是这个压缩包中涉及的关键知识点: 1. **ASP.NET**:ASP.NET是...
批量上传功能的实现主要依赖于SWFUpload的`setFilePostName`和`addFileParam`方法。`setFilePostName`用于设置上传文件在服务器端接收时的文件名,而`addFileParam`则可以在每个文件上传时添加额外的参数,如图片的...
在本文中,我们将深入探讨如何使用ECSHOP与SWFUpload相结合来实现在网站上批量上传图片的功能。ECSHOP是一款流行的开源电子商务系统,而SWFUpload则是一个JavaScript和Flash混合的文件上传组件,它支持多文件选择和...
SWFUpload 是一款开源的JavaScript库,主要用于在网页上实现文件的批量上传功能。它支持一次选取多个文件,用户可以在不刷新页面的情况下上传文件,提高了用户体验。本教程将详细介绍如何利用SWFUpload实现批量上传...
批量上传图片的功能是现代网站尤其是社交媒体和图像分享平台不可或缺的特性。SWFUpload 提供了这样的功能,允许用户选择多个文件并一次性提交,极大地提高了用户交互性。其工作原理是利用Flash插件在后台处理上传...
SWFUpload是一个强大的JavaScript库,它允许用户在Web页面上实现多文件批量上传的功能,而无需刷新页面。这个工具特别适合处理大文件或需要一次性上传多个文件的场景,提高了用户体验并减轻了服务器的压力。 批量...
批量上传图片的功能允许用户一次性选择多张图片进行上传,极大地提高了上传效率,减少了用户的操作步骤。 在批量上传过程中,SWFUpload 使用了Flash技术来处理文件选取和上传的部分,因为它能够跨浏览器地支持多...
在IT行业中,jQuery Swfupload是一款非常流行的图片上传插件,尤其适用于实现批量上传和单个文件上传功能。这个插件结合了jQuery的简洁API和SWFUpload的技术优势,为网页应用提供了强大的文件上传解决方案。下面我们...
SwfUpload是一款强大的JavaScript文件上传组件,它支持多选、批量上传,并且具有进度条显示功能,极大地优化了用户在网站上上传文件的体验。在本文中,我们将深入探讨SwfUpload的工作原理、主要功能以及如何实现批量...
总之,这个资源包结合了Asp.Net、Flash和SWFUpload,提供了一种批量上传图片并预览的功能实现,但请注意版权问题,仅适用于个人学习和研究。在实际开发中,可能需要寻找无版权限制的解决方案,或者使用HTML5原生的多...
总结来说,"swfupload + ASP批量上传图片可同步写入Access"是一个基于SWFUpload和ASP技术的文件上传解决方案,它利用Flash实现多文件批量上传,并将图片信息同步写入Access数据库,同时实现在页面上的即时显示。...
SwfUpload是一款经典的JavaScript库,专门用于实现网页上的文件,特别是图片的批量上传功能。它通过Flash技术提供了一种在不刷新页面的情况下上传多张图片的解决方案,这在用户体验上有着显著的优势,因为它允许用户...
`swfupload` 是一个广泛使用的JavaScript和Flash相结合的开源上传组件,它允许用户实现多文件选择和批量上传功能,同时也支持大文件的分块上传。在这个场景下,我们主要关注的是如何利用`swfupload`实现最大1.9GB的...
SWFupload是一款强大的JavaScript库,专门用于实现网页上的文件批量上传功能。它通过Flash插件在浏览器端提供用户友好的界面,支持多文件选择、进度条显示、预览功能等,极大地提升了用户在上传大量文件时的体验。...