How to upload an image of the FTP server through the URL?

0

I have a JSF application in which the images the user uploads are stored in an FTP directory. The easiest way I found of rendering these images is to put the FTP URL, with username and password in the SRC of the image:

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

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

    
asked by anonymous 12.04.2016 / 14:24

1 answer

1

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

    
12.04.2016 / 15:01