Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Excluded file could not be found in production #229

Closed
confile opened this issue Feb 26, 2015 · 6 comments
Closed

Excluded file could not be found in production #229

confile opened this issue Feb 26, 2015 · 6 comments

Comments

@confile
Copy link

confile commented Feb 26, 2015

I tried to exclude pdf files from being processed with:

grails.assets.excludes = ["**/*.pdf"]

In my GSP I do:

<a href="${assetPath(src: 'someName.pdf', absolute:true)}" target="_blank">Download PDF</a> 

It works well in dev mode but in production the file could not be found.

@davydotcom
Copy link
Contributor

You excluded the file so it would never be copied into your final war file.

David Estes

On February 25, 2015 at 9:04:51 PM, Confile (notifications@github.com) wrote:

I tried to exclude pdf files from being processed with:

grails.assets.excludes = ["*/.pdf"]

In my GSP I do:

Download PDF

It works well in dev mode but in production the file could not be found.


Reply to this email directly or view it on GitHub.

@confile
Copy link
Author

confile commented Feb 26, 2015

How can I access an excluded file like in my case?

@davydotcom
Copy link
Contributor

You cant you excluded it. Thats the entire point of exclude. Not sure why you are excluding a pdf file exactly considering its considered a GenericAsset. the effect of processing a file with a pdf extension is simply copying it into your war file , digest naming it and gzipping it. Nothing special

David Estes

On February 26, 2015 at 8:50:29 AM, Confile (notifications@github.com) wrote:

How can I access an excluded file like in my case?


Reply to this email directly or view it on GitHub.

@confile
Copy link
Author

confile commented Feb 26, 2015

I want to exculde it because in production the name of the file changes from someName.pdf to someName-234823492349.pdf``. How can I keep the original name?

@davydotcom
Copy link
Contributor

If you do not want to use digest names for expiring the answer is to simply place the pdf file in the web-app folder instead of assets folder.

David Estes

On February 26, 2015 at 9:07:48 AM, Confile (notifications@github.com) wrote:

I want to exculde it because in production the name of the file changes from someName.pdf to someName-234823492349.pdf``. How can I keep the original name?


Reply to this email directly or view it on GitHub.

@confile
Copy link
Author

confile commented Feb 26, 2015

You are wright thank you!

@confile confile closed this as completed Feb 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants