-
Hi,
I've written a small dll to enable me to upload and download to/form an intranet site via ASP pages. While I was testing this it appeared to work fine on my Win98/PWS, but when I got someone else to connect to it and test it, all it saved the file locally on my laptop, not his, yet it is supposed to download to the user's local drive. I have another browse for folder dll, but that fires up the dialog box on my laptop when i connect from another pc.
I am new to this and was quite pleased when I got the thing to work at all, so any help would be appreciated.
Thanks,
Nick
-
You must have hardcoded the destination path for the downloaded files to that of your laptop.
-
Both the URL of the remote file and the local file name are variables, and is called like this from my ASP page;
FileMgr.DownloadFile "http://xxx.xxx.xxx/documents/test.doc", "c:\my documents\test.doc"
but with variables replacing the actual strings.
What it does is "download" the file to that location on the server, not the users local drive. I am very new to ActiveX and I don't consider myself a programmer at all, so I am probably missing something obvious.
Thanks anyway,
Nick
-
Can you elaborate on the FileMgr object. Is it the FilesystemObject or some third party component.
-
Hi,
It's neither - it's just a single function from urlmon.dll
Private Declare Function URLDownloadToFile Lib "urlmon" Alias _
"URLDownloadToFileA" (ByVal pCaller As Long, _
ByVal szURL As String, _
ByVal szFileName As String, _
ByVal dwReserved As Long, _
ByVal lpfnCB As Long) As Long
I compiled it and it does what I wanted it to do, ie downloads the file and skips the dialog boxes, but when i try it from anywhere but the server, it still saves to the servers local drive and not the users local drive. I'm probably doing something stupid, like not checking the "Create ActiveX object on client" or something like that - and I know that doesn't exist. Or I think ;)
Nick