Class UploadController


  • @Controller
    @RequestMapping({"/upload","/restrictedAccess/upload"})
    public class UploadController
    extends LoadCommon
    File upload to a specific directory. As a rule, this needs to coordinate with the upload catalog entry specified in the catalog (see the documentation for upload/download). The tag for this controller is .../upload/*

    The goal for this controller is to allow external code to have the thredds server upload a file and store it in a specific place.

    Assumptions: 1. The external code has authenticated to the thredds server using some authentication mechanism such as client-side certificates or tomcat roles.

    • Field Detail

      • uploaddirname

        protected String uploaddirname
      • uploadform

        protected String uploadform
      • params

        protected thredds.server.reify.Parameters params
      • issetup

        protected boolean issetup
    • Constructor Detail

      • UploadController

        public UploadController()
                         throws javax.servlet.ServletException
        Throws:
        javax.servlet.ServletException
    • Method Detail

      • doonce

        public void doonce​(javax.servlet.http.HttpServletRequest req)
                    throws LoadCommon.SendError
        Invoked once on first request so that everything is available, especially Spring stuff.
        Throws:
        LoadCommon.SendError
      • doGet

        @RequestMapping(value="**",
                        method=GET)
        public void doGet​(javax.servlet.http.HttpServletRequest req,
                          javax.servlet.http.HttpServletResponse res)
                   throws javax.servlet.ServletException
        Throws:
        javax.servlet.ServletException
      • doPost

        @RequestMapping(value="**",
                        method=POST)
        public void doPost​(javax.servlet.http.HttpServletRequest req,
                           javax.servlet.http.HttpServletResponse res)
                    throws javax.servlet.ServletException
        Throws:
        javax.servlet.ServletException