浏览代码

Fixed a problem with example code in article "Letting The User Download A File" (#11971)

Fixes #10580
tags/8.11.0.beta1
Martín López 4 年前
父节点
当前提交
dbfa4cf3f3
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 9 次插入2 次删除
  1. 9
    2
      documentation/articles/LettingTheUserDownloadAFile.asciidoc

+ 9
- 2
documentation/articles/LettingTheUserDownloadAFile.asciidoc 查看文件

@@ -104,8 +104,15 @@ public class OnDemandFileDownloader extends FileDownloader {
return super.handleConnectorRequest(request, response, path);
}

private StreamResource getResource () {
return (StreamResource) this.getResource("dl");
private StreamResource getResource() {
StreamResource result = null;
this.getSession().lock();
try {
result = (StreamResource) this.getResource("dl");
} finally {
this.getSession().unlock();
}
return result;
}
}
....

正在加载...
取消
保存