Example #1
0
  @Request.Get("/product/download_picture/{id}")
  public void downloadPicture(long id) {
    Product product = productService.getProduct(id);
    String picture = product.getPicture();

    String filePath = Tool.getBasePath() + picture;
    WebUtil.downloadFile(DataContext.getResponse(), filePath);
  }