多檔案上傳,並且可以進行動態刪除

2021-08-19 11:24:03 字數 901 閱讀 4456

由於業務要求一次上傳很多個excel,並且可以進行篩選,刪除不用的,查了 許多上傳,大多是新增多個不能一次選擇,不能使用multiple屬性,最後想到獲取檔案的名稱,將刪除的檔案的索引放到陣列中,傳給後台,後台遍歷檔案時,如果與刪除檔案索引相同,對此檔案不進行處理

操作

衝收賬期

sp資料匯入:

後台**

public class excelspaction extends baseaction 

public void setkhyslist(list khyslist)

public spexcelfacade getspexcelfacade()

public void setspexcelfacade(spexcelfacade spexcelfacade)

public string uploadexcel() catch (ioexception e)

//獲取衝收賬期

string chargingtime =(string) para.get("chargingtime");

//獲取刪除的檔案的索引

string indexs = (string) para.get("array");

string splits = indexs.split(",");

if(stringutils.isblank(chargingtime))

try}

............

xml配置

/web-inf/pages/comm/cpsp/excelimport.jsp

/web-inf/pages/comm/cpsp/excelimport.jsp

多檔案上傳

這是我開發過程中用涉及到的乙個功能,現在備份下來。首先是在 web.confing 中做限制上傳大小配置和超時的配置,的節點下有 executiontimeout maxrequestlength兩個屬性。executiontimeout設定超時的時間值,預設的為90秒,如果超出這個時間,瀏覽器就會...

多檔案上傳

c 版本 upload.aspx page language c codebehind upload.aspx.cs autoeventwireup false inherits webportal.upload upload.aspx.cs using system using system.co...

多檔案上傳

多檔案上傳 param files 檔案集 param staticurl 當前指定靜態資源路徑 param fileurl 分類儲存路徑 return 資料儲存路徑,逗號拼接字串 public static string uploadfiles multipartfile files,string...