Package sk.iway.iwcm.components.upload
Class XhrFileUploadServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
sk.iway.iwcm.components.upload.XhrFileUploadServlet
- All Implemented Interfaces:
Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
@WebServlet("/XhrFileUpload")
public class XhrFileUploadServlet
extends javax.servlet.http.HttpServlet
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
protected void
doPost
(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) static String
getTempFileName
(String fileKey) Vrati meno suboru podla zadaneho klucastatic String
getTempFilePath
(String fileKey) Vrati cestu k temp suboru, pozuiva sa vo FormMail na detekciu ci subor vyhovuje poziadavkamstatic String
moveAndReplaceFile
(String fileKey, String dir, String fileNameParam) static String
presunie uploadnuty suborMethods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, service
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
-
Constructor Details
-
XhrFileUploadServlet
public XhrFileUploadServlet()
-
-
Method Details
-
doPost
protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException - Overrides:
doPost
in classjavax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
IOException
-
moveFile
presunie uploadnuty subor- Parameters:
fileKey
- - identifikator suborudir
- - cielovy adresar- Returns:
- - nazov suboru
- Throws:
IOException
-
moveAndReplaceFile
public static String moveAndReplaceFile(String fileKey, String dir, String fileNameParam) throws IOException - Throws:
IOException
-
delete
-
getTempFileName
Vrati meno suboru podla zadaneho kluca- Parameters:
fileKey
-- Returns:
-
getTempFilePath
Vrati cestu k temp suboru, pozuiva sa vo FormMail na detekciu ci subor vyhovuje poziadavkam- Parameters:
fileKey
-- Returns:
-