Class CmsUploadBean


  • public class CmsUploadBean
    extends CmsJspBean
    Bean to be used in JSP scriptlet code that provides access to the upload functionality.

    Since:
    8.0.0
    • Constructor Detail

      • CmsUploadBean

        public CmsUploadBean​(javax.servlet.jsp.PageContext context,
                             javax.servlet.http.HttpServletRequest req,
                             javax.servlet.http.HttpServletResponse res)
                      throws CmsException
        Constructor, with parameters.

        Parameters:
        context - the JSP page context object
        req - the JSP request
        res - the JSP response
        Throws:
        CmsException - if something goes wrong
    • Method Detail

      • getNewResourceName

        public static java.lang.String getNewResourceName​(CmsObject cms,
                                                          java.lang.String fileName,
                                                          java.lang.String folder,
                                                          boolean keepFileNames)
        Returns the VFS path for the given filename and folder.

        Parameters:
        cms - the cms object
        fileName - the filename to combine with the folder
        folder - the folder to combine with the filename
        keepFileNames - skip file name translation if true
        Returns:
        the VFS path for the given filename and folder
      • setUploadDelay

        public void setUploadDelay​(int uploadDelay)
        Sets the uploadDelay.

        Parameters:
        uploadDelay - the uploadDelay to set
      • start

        public java.lang.String start()
        Starts the upload.

        Returns:
        the response String (JSON)