Nodejs if file exists from different url
Is it possible to check if image exists using absolute path? I have 2 apps
using one domain, but with different ports. I want to check if the file
exists on other app. For example from www.domain.com:80 I want to check if
this file exists: www.domain.com:8080/images/image1.jpg. I have tried to
do it with fs.exists, fs.existsSync, fs.Stats, but it on the first 2
functions it always returns false and on the fs.Stats it returns error
"ENOENT, no such file or directory", but I can view the file entering url
on browser. How can I do it?
 
No comments:
Post a Comment