How to load an FTP server image from the URL?

Asked

Viewed 830 times

0

I have a JSF application in which the images the user uploads are stored in an FTP directory. The simplest way I found to render these images is by placing the FTP URL, with user and password in the image’s SRC:

<img src="ftp://user:[email protected]/foto.jpg"/>

However, leaving this URL with user and password exposed is a security risk, and anyone who gives a F12 in the browser will be able to see this information. How can I hide this information to render the image from the FTP server?

1 answer

1

Normally accessing only the "111.11.111.11/photo.jpg" would be enough, if you need permission to read, leave the folder in question with permission 644 in ftp, that so, all groups will have safe access to the file

Browser other questions tagged

You are not signed in. Login or sign up in order to post.