# Display secure images

**URL:** <https://community.dreamfactory.com/t/display-secure-images/3089>\
**Category:** Connecting to File Storage\
**Created:** [August 13, 2016, 7:40pm UTC](https://community.dreamfactory.com/t/display-secure-images/3089 "2016-08-13T19:40:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vinod\_Hum](https://avatars.discourse-cdn.com/v4/letter/v/6f9a4e/32.png) [@Vinod\_Hum](https://community.dreamfactory.com/u/Vinod_Hum)\
**Post date:** [August 13, 2016, 7:40pm UTC](https://community.dreamfactory.com/t/display-secure-images/3089/1 "2016-08-13T19:40:22Z")

</div>

Hi,  
What is the path to access images securely  
I want image owner and admin to see it  
and deny rest of them.  
what will be the path ? and how to handle it ?  
ex : I have uploaded image to files/images/20.jpg  
I can access the image from file manager and if I want to access it from client i have to include filemanager api key and session key to display image. is it safe to pass filemanger key with images ?  
thanx

---

<div class="post-metadata">

**Author:** ![Vinod\_Hum](https://avatars.discourse-cdn.com/v4/letter/v/6f9a4e/32.png) [@Vinod\_Hum](https://community.dreamfactory.com/u/Vinod_Hum)\
**Post date:** [August 14, 2016, 6:13am UTC](https://community.dreamfactory.com/t/display-secure-images/3089/2 "2016-08-14T06:13:18Z")

</div>

my bad  
found an option to pre/post files as well, this is great.  
I am trying to secure images using relationship.  
how to redirect request in pre process script using nodejs ?  
lets say if image/20.jpg was requested if user is not authorized then request to update the resource and send them notauthorized.png

something like this event.resource = “images/notauthorized.png” but its not working  
any idea how to handle this.

---

<div class="post-metadata">

**Author:** ![DFCommunityManager](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/dfcommunitymanager/32/887_2.png) [@DFCommunityManager](https://community.dreamfactory.com/u/DFCommunityManager)\
**Post date:** [August 15, 2016, 12:32pm UTC](https://community.dreamfactory.com/t/display-secure-images/3089/3 "2016-08-15T12:32:08Z")

</div>

> [@Vinod\_Hum](#):
>
> found an option to pre/post files as well, this is great.I am trying to secure images using relationship.

Hey @Vinod_Hum, I’m glad to hear that you figured it out! Thanks for posting your solution.

As for this:

> [@Vinod\_Hum](#):
>
> how to redirect request in pre process script using nodejs ?lets say if image/20.jpg was requested if user is not authorized then request to update the resource and send them notauthorized.png
> 
> something like this event.resource = “images/notauthorized.png” but its not working  
> any idea how to handle this.

Please open a new thread for a new, unrelated, question.

Thanks,  
@AlexBowen
