Stephen Toney has asked for the wisdom of the Perl Monks concerning the following question:

Dear experts:

I'm using CGI.pm to develop an app that will allow users to upload images to a Windows/IIS server. It's all working except for one thing: To save the files I need to have a real path, but all I have is an IIS virtual directory, such as /images/

How can I get IIS to return the real path for this virtual directory?

Thanks for any ideas!

(P.S. I know about path_translated(), but this only works on the path in the HTTP request, I believe. The virtual directory I want to translate is not in the request.)

Stephen

Replies are listed 'Best First'.
Re: Storing uploaded files using IIS
by gellyfish (Monsignor) on Feb 23, 2005 at 16:46 UTC

    You might be able to use FindBin to locate your CGI program and then work out the path to your required directory relative to that, or you may have to access the registry (using Win32::Registry for instance) to find the configuration of the virtual directory, unfortunately I don't have a handy IIS installation at the moment to provide more detail.

    /J\

      Thanks -- I guess that's what I'll do. Appreciate the reply!