防止 Grails Asset-Pipeline 更改文件名?
Prevent Grails Asset-Pipeline from changing File Name?
我使用 Grails 2.4.4 和资产管道插件。我的资产之一是 PDF 文件。我希望在用户下载此文件时保留名称 someName.pdf
。在我的 GSP 中,我将其用作:
<a href="${assetPath(src: 'someName.pdf', absolute:true)}" target="_blank">Download PDF</a>
当我 运行 在生产中下载的文件名是:
someName-a9070ffc23b73b681ba027cbbe55b650.pdf
如何防止 asset-pipeline 插件在生产模式下更改 pdf 文件的名称?
参考 https://github.com/bertramdev/grails-asset-pipeline/issues/229
simply place the pdf file in the web-app folder instead of assets folder.
我使用 Grails 2.4.4 和资产管道插件。我的资产之一是 PDF 文件。我希望在用户下载此文件时保留名称 someName.pdf
。在我的 GSP 中,我将其用作:
<a href="${assetPath(src: 'someName.pdf', absolute:true)}" target="_blank">Download PDF</a>
当我 运行 在生产中下载的文件名是:
someName-a9070ffc23b73b681ba027cbbe55b650.pdf
如何防止 asset-pipeline 插件在生产模式下更改 pdf 文件的名称?
参考 https://github.com/bertramdev/grails-asset-pipeline/issues/229
simply place the pdf file in the web-app folder instead of assets folder.