Class CmsUploadBean

java.lang.Object
org.opencms.jsp.CmsJspBean
org.opencms.ade.upload.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
  • Field Details

  • Constructor Details

    • 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 Details

    • getCurrentListener

      public static CmsUploadListener getCurrentListener(CmsUUID listenerId)
      Returns the listener for given CmsUUID.

      Parameters:
      listenerId - the uuid
      Returns:
      the according listener
    • getNewResourceName

      public static String getNewResourceName(CmsObject cms, String fileName, 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 String start()
      Starts the upload.

      Returns:
      the response String (JSON)