Ejemplo n.º 1
0
  @RequestMapping
  public String view(ModelMap modelMap) {
    modelMap.put("packages", validatorService.getPackages());

    piwikService.update(modelMap);
    return "home";
  }
Ejemplo n.º 2
0
  @RequestMapping(method = RequestMethod.POST)
  public String upload(@RequestParam("file") MultipartFile file) throws Exception {
    InputStream inputStream = new ByteArrayInputStream(file.getBytes());

    if ("application/x-gzip".equals(file.getContentType()))
      inputStream = new GZIPInputStream(inputStream);

    String identifier = validatorService.validateWorkspace(inputStream);

    return "redirect:/v/" + identifier;
  }