Media Middleware help - Security access for images
Hi all,
I have developed a great working package to have items secure, manage member groups and some other things.
This works great and done through Middleware.
But when you have a partial view be it from the Editor, direct image element type, media picker you then render HTML out like...
<img src="PATHERE" alt="AltText"/>
And so on this returns a 500 error and the image wont render and you only see the alt text. The image is secure which is great but this is not ideal. I want to be able to render a security image placeholder instead.
So in the code I have:
context.Response.Redirect(denyUrl);
I tried to write a function where the mediaItem Type was "Image" to then update it. I tried updating the context.Path and properties and while I get no errors it ultimately does not replace the rendered media item URL etc.
Media Middleware help - Security access for images
Hi all, I have developed a great working package to have items secure, manage member groups and some other things. This works great and done through Middleware.
But when you have a partial view be it from the Editor, direct image element type, media picker you then render HTML out like...
And so on this returns a 500 error and the image wont render and you only see the alt text. The image is secure which is great but this is not ideal. I want to be able to render a security image placeholder instead.
So in the code I have:
I tried to write a function where the mediaItem Type was "Image" to then update it. I tried updating the context.Path and properties and while I get no errors it ultimately does not replace the rendered media item URL etc.
Could anyone advise on this? Thank You
is working on a reply...