@GetMapping("/download/**")
	public void download(User user, @RemainedPath String path, HttpServletResponse response) {
		FileEntry fileEntry = fileEntryService.getOne(user, path);
		if (fileEntry == null) {
			LOG.error("{} requested to download not existing file entity {}", user.getUserId(), path);
			throw new NGrinderRuntimeException("download requested file not exists in file entity " + path);
		}

		response.reset();

		response.setContentType("application/octet-stream; charset=UTF-8");
		ContentDisposition contentDisposition = ContentDisposition.builder("attachment")
			.filename(fileEntry.getFileName(), StandardCharsets.UTF_8)
			.build();
		response.setHeader("Content-Disposition", contentDisposition.toString());
		response.addHeader("Content-Length", "" + fileEntry.getFileSize());

		try (ByteArrayInputStream fis = new ByteArrayInputStream(fileEntry.getContentBytes());
			OutputStream os = new BufferedOutputStream(response.getOutputStream())) {
			IOUtils.copy(fis, os);
		} catch (IOException e) {
			throw processException("error while download file", e);
		}
	}
Download file entry of given path.

@param user     current user
@param path     user
@param response response
ngrinder-controller/src/main/java/org/ngrinder/script/controller/FileEntryApiController.java