Reputation: 453
I using openshift cloud server to host my web-app. I am uploading image into the 'app-root/data/photos/' directory using path variable. Its working properly.
$path=$_ENV["OPENSHIFT_DATA_DIR"].'photos/'.$photo_name;
But when i reloaded that saved image in my web-app using same path, it is not loaded.
<img src="{{$_ENV["OPENSHIFT_DATA_DIR"].'photos/'.$photo_name}}" height="250px" width="250px"/>
what am i do to load that image??
Upvotes: 0
Views: 1269
Reputation: 2093
The app-root/data directory is not public by default (no web access).
You can create a symlink to overcome this as outlined here: https://community.jboss.org/people/ozizka/blog/2013/01/06/openshift--how-to-make-uploaded-files-public
Upvotes: 1