Sincerely,

Rich Cooper

EnglishLogicKernel.com

Rich AT EnglishLogicKernel DOT com

 

 

Rob Kennedy wrote:



RC > How do I upgrade that web site to serve video files from the web site
itself

> instead of from Youtube?

 

When your server gets a request with a URL referring to a video resource 

or a Flash resource, serve that instead of the HTML resources you're 

already serving.

 

I do that in the Indy server example code.  I started with the Indy HTTP
server and added code to check requested files (any extension) against the
files in a folder on my PC.  That folder can be as deep as needed, but it
has to contain the named file and path to serve up.  

 

You could serve those resource from files, or they could be embedded in 

your application binaries, or you could even generate them on the fly. 

The user agent never needs to know; it doesn't care.

 

My plan is to put them in files in the server directory with links to those
files embedded into the HTML pages, also in the same directory tree.  

 

But how do I embed the link to send my own files instead of the Youtube
files?  It's the link text (changes to the example snippet of code) which
seem to specify other parameter values.  I have no idea what the parameters
do.  Do the browsers use those parameters?  All I need is a URL from the
clients to request my file by name and path - any extension.  Somehow that
URL has to be conjured up in the client program and sent back to my server
as a file request.  But the client has to know that it's a flash, movie, or
whatever kind of file.  

 

> Also, I want to let people download other files

> from the site, but I don't understand how to set up an FTP server along
with

> the Indy HTTP server.  

 

Do you want to write the FTP server yourself, or would you be content to 

use one of the billions of FTP servers already available? (I might have 

exaggerated.) FTP listens on a different port from HTTP, so the servers 

don't have to be combined into one if you don't want.

 

If you want to use Indy to make your own FTP server, then I think you 

start by creating an FTP server object and handling the events it 

provides. It will be similar to implementing an HTTP server, but it 

might provide a few more shortcuts for tying the FTP interface to the 

local computer's files.

 

Do I really have to put up an FTP server to be able to send flash, movies,
and so on to clients?  Don't the client browsers know how to handle those
extensions?

-- 

Rob

_______________________________________________

 

-Rich

 

_______________________________________________
Delphi mailing list -> Delphi@elists.org
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi

Reply via email to