掲示板

How to access external images in portlet from filesystem ?

11年前 に Gaurav kalia によって更新されました。

How to access external images in portlet from filesystem ?

New Member 投稿: 14 参加年月日: 12/08/13 最新の投稿
Hi All

I have a requirement to display external images from the physical location in portlet.

I am querying to the database which returns me the path and the image names lying on the physical location.

Can anyone please guide me how can I achieve this.

Thanks
Gaurav
thumbnail
11年前 に Hitoshi Ozawa によって更新されました。

RE: How to access external images in portlet from filesystem ?

Liferay Legend 投稿: 7942 参加年月日: 10/03/24 最新の投稿
Access the image using it's url in your portlet.
11年前 に Gaurav kalia によって更新されました。

RE: How to access external images in portlet from filesystem ?

New Member 投稿: 14 参加年月日: 12/08/13 最新の投稿
Hi Hitoshi

Thanks for the reply.

But I am not able to access the images directly because if I give the absolute path of the location, it will get appended with the server URL "http:/l/ocalhost:8080".

For example:

I have images available on location say "/home/image/test.jpg" and when I try to access the image using this path it will become like "http://localhost:8080/home/image/test.jpg" which is not right.

Can you please suggest if i am doing something wrong.

Thanks
Gaurav
7年前 に Sateesh Kumar によって更新されました。

RE: How to access external images in portlet from filesystem ?

New Member 投稿: 3 参加年月日: 16/05/09 最新の投稿
I am facing same issue. Can some help me out plz.....
thumbnail
7年前 に Olaf Kock によって更新されました。

RE: How to access external images in portlet from filesystem ?

Liferay Legend 投稿: 6403 参加年月日: 08/09/23 最新の投稿
Sateesh Kumar:
I am facing same issue. Can some help me out plz.....


Luckily you can't access random files on webservers, only those that the webserver explicitly publishes through http. Would you like your /etc/passwd to be readable to everyone on the web? You'll have to publish these files somewhere - and when you did this, you'll know their URL.