// 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.
file_queue_error_handler : fileQueueError_small,
file_dialog_complete_handler : fileDialogComplete,
upload_progress_handler : uploadProgress,
upload_error_handler : uploadError,
upload_success_handler : uploadSuccess_small,
upload_complete_handler : uploadComplete,
upload_start_handler : uploadStart_small,
完成上传的servlet,路径如下:${pageContext.request.contextPath}/SwfUpload?type=n
public class SwfUpload extends HttpServlet {
private static final long serialVersionUID = 1L;
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
doPost(request,response);
}
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
//判断是大图还是小图
String type = request.getParameter("type");
int pictureSize = 112;
if("s".equals(type)){
pictureSize = 45;
}
if("n".equals(type)){
pictureSize = 150;
}