最近有個作業是要寫一個上傳檔案的程式
是透過html 表單 然後後台接 存在local端資料夾
因為要寫成client-server端 要兩個專案這樣
簡單說client是html 透過表單送到server端來處理
但因為要用web service掛在tomcat上
server這邊程式就不能用以下程式碼方式
//@WebServlet("/uploadpage")
@MultipartConfig(fileSizeThreshold = 1024 * 1024 * 2, // 2MB
maxFileSize = 1024 * 1024 * 10, // 10MB
maxRequestSize = 1024 * 1024 * 50) // 50MB
public class uploadpage extends HttpServlet {
private static final String SAVE_DIR = "uploadFile";
protected void doPost(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, IOException {.....}
是要用filestream的話 要怎麼接表單??
那請問大概要怎麼解的
新手問題多多包涵 謝謝