-
Notifications
You must be signed in to change notification settings - Fork 67
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
Is there a pre get content resource handler? #140
Comments
Or custom the resource's link ,to add a watermark link, and disable the default link? |
What is the content-type of the original content @lmtoo ? If it isn't already PDF then you could register a renderer that converts content to "application/pdf" - the content type of your watermarked content. In this renderer, you can get the current thread's security context and from that the principal (i.e. username) and then do your watermarking logic to generate the content with the watermark. On the client, if you then make a GET request to the original content's URI but specify an accept header with content-type "application/pdf" the store rest controller will invoke your renderer and return the content it generates |
The original content is already PDF ,I implement a renderer from "application/pdf" to "application/pdf", but it's not work correctly |
I see. Let me take a look at that for you. Thanks @lmtoo |
When there are renderers that produce content matching the original content-type, the StoreRestController gave precedence to the original content over the renderers. This commit fixes that and was green in this build. |
before user access content resource , I have to append the resource (PDF file) with a watermark , using current username, is there have any way to do that?
The text was updated successfully, but these errors were encountered: