I’m trying to link some files from some servers like Sharepoint to my
my problem is when the link is not good, I’m redirected in a 404 error
page (which is normal :p).
I would like to know how to something like a validation method to
display the button to download if the link is correct and to display a
red button if it’s not.
I tried some different things like :
res = Net::HTTP.get_response(URI.parse(url)) rescue SocketError
Without success. Each time some files were considered as unvalide
while they were valid and vice versa.
It maybe comes from my code, that’s why i continue to try other
Any idea or suggestion ?