Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 194
  • Last Modified:

File Exist Over WWW

is there any way to connect to a www server and se if a
file exist on that server?
0
hulken
Asked:
hulken
  • 4
  • 3
1 Solution
 
BaksaCommented:
Yes, with IIS dll. Put following code in WebAction OnAction event :

FileExists(Request.PathTranslated+'\file.fle')

This will test if file exists in root server directory.

If I understood correctly what you wont.
0
 
hulkenAuthor Commented:
Where do I get IIS dll?
0
 
BaksaCommented:
No, no, you must MAKE IIS (internet information server) or ISAPI dll (two names for same thing), to do thath with Delphi choose NEW from FILE menu and then select WebServer application, then delphi will ask you for type of your app, choose ISAPI/NSAPI application.

Hit the www.google.com with this search "ISAPI delphi tutorial" and you will get a really lot of tutorials, help and examples.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
hulkenAuthor Commented:
Does this mean that I need to have this dll running on the web server?

That is not what I need if so.
0
 
hulkenAuthor Commented:
I use a TWebBrowser to Watch some files that are on a
web server.
(say http://server.com/pics/)
so I need to know if the picture a.gif exsist befor I makes it possible to open it in TWebBrowser.
0
 
BaksaCommented:
You can use TNMHttp component, on FastNet tab, it has GET method which you can use to retrieve file and OnSuccess or OnFaulire events. I didn't work much with FastNet components so maybe is in there some better component for your purpose.


0
 
hulkenAuthor Commented:
Thnks.. I was not able to use the OnSucses thing because They have configured the server to use a own page for page not found.
But in my case when I always want to check if a gif image exist I can use TNMhttp and check the header for Content type image/gif
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now