Class AdminAssetUploadController


@Controller("blAdminAssetUploadController") @RequestMapping("/{sectionKey}") public class AdminAssetUploadController extends AdminAbstractController
AdminAssetUploadController handles uploading or selecting assets.

Used with entities like SkuImpl and CategoryImpl that have CustomPersistenceHandler configurations that provide support for adding maps of Media objects.

Author:
Brian Polster (bpolster)
  • Field Details

  • Constructor Details

    • AdminAssetUploadController

      public AdminAssetUploadController()
  • Method Details

    • chooseMediaForMapKey

      @RequestMapping(value="/{id}/chooseAsset", method=GET) public String chooseMediaForMapKey(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable("sectionKey") String sectionKey, @PathVariable("id") String id, @RequestParam org.springframework.util.MultiValueMap<String,String> requestParams) throws Exception
      Throws:
      Exception
    • upload

      @RequestMapping(value="/{id}/uploadAsset", method=POST, produces="application/json") public org.springframework.http.ResponseEntity<Map<String,Object>> upload(jakarta.servlet.http.HttpServletRequest request, @RequestParam("file") org.springframework.web.multipart.MultipartFile file, @PathVariable("sectionKey") String sectionKey, @PathVariable("id") String id) throws IOException
      Throws:
      IOException
    • upload

      @RequestMapping(value="/uploadAsset", method=POST) public String upload(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable Map<String,String> pathVars, @RequestParam("file") org.springframework.web.multipart.MultipartFile file, @RequestParam org.springframework.util.MultiValueMap<String,String> requestParams) throws Exception
      Used by the Asset list view to upload an asset and then immediately show the edit form for that record.
      Parameters:
      request -
      file -
      sectionKey -
      Returns:
      Throws:
      IOException
      Exception
    • chooseMediaForMapKey

      @RequestMapping(value="/{addlSectionKey}/{id}/chooseAsset", method=GET) public String chooseMediaForMapKey(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, @PathVariable("sectionKey") String sectionKey, @PathVariable("addlSectionKey") String addlSectionKey, @PathVariable("id") String id, @RequestParam org.springframework.util.MultiValueMap<String,String> requestParams) throws Exception
      Throws:
      Exception
    • upload

      @RequestMapping(value="/{addlSectionKey}/{id}/uploadAsset", method=POST, produces="application/json") public org.springframework.http.ResponseEntity<Map<String,Object>> upload(jakarta.servlet.http.HttpServletRequest request, @RequestParam("file") org.springframework.web.multipart.MultipartFile file, @PathVariable("sectionKey") String sectionKey, @PathVariable("addlSectionKey") String addlSectionKey, @PathVariable("id") String id) throws IOException
      Throws:
      IOException