Re: Please help! How do I download a binary file from URL when link needs to be launched from inside browser after authentication?
From: Kent P. Iler (kentiler_at_hotmail.com)
Date: 03/08/04
- Next message: Mann: "Using vbscript to determin what user name is being used"
- Previous message: Torgeir Bakken (MVP): "Re: How to find current directory"
- In reply to: Chris Barber: "Re: Please help! How do I download a binary file from URL when link needs to be launched from inside browser after authentication?"
- Messages sorted by: [ date ] [ thread ]
Date: 7 Mar 2004 17:21:00 -0800
The files are stored in a BLOB field in a database, so that is why the
download comes from a java servlet. I wish I could just FTP.
I have about an 80% download success rate with this format of using a
browser to download the files. However, the script doesn't seem to
always wait for the browser to not be busy before it starts
downloading. When that happens, I get all types of file download
errors.
--Kent
"Chris Barber" <chris@blue-canoe.co.uk.NOSPAM> wrote in message news:<#vRbrk8AEHA.2404@TK2MSFTNGP11.phx.gbl>...
> Script a .js file that will then be referenced by a .hta file - you may need
> to accept the security warning once but after that - Bob's your uncle. If
> you reduce your IE security then you may get away with no dialog - not sure.
> A .hta has FSO file access to the local machine [I think] so you could then
> load the documents into a frame and save from there (not entirely sure how
> at present). Anyone know if a framed document has a binarycontent property
> that can be read to stream to disk?
> Is this not feasible with an authenticated FTP download? Most webservers /
> hosts will allow an FTP access to the website? Perhaps the documents are
> stored outside the website?
> My own opinion is that you should communicate with the webserver hosts and
> get them to set up an FTP login for you to access the documents or even pay
> them to ZIP or RAR them for you so you can download them as a single unit
> using a download manager that wouldn't hog your internet bandwidth for hours
> on end (depends on how much content).
>
> Chris.
>
> "Kent P. Iler" <kent@iler.NOSPAM.com> wrote in message
> news:CU71c.25241$ko6.219158@attbi_s02...
> Hi,
>
> I need to pull a ton of files off of a webserver so we can migrate the
> content to a new environment. There is metadata attached to each file, but
> that's not the problem.
>
> I have a VBScript file that will open an instance of IE, login through the
> tool's interface, and then grab a list of all projects (roughly 50). Each
> project has anywhere from 0-100 files that I need to grab and store in a
> local directory.
>
> I have the code ready for navigating down the tree, but my problem is when
> I'm trying to grab the file that the site is referring to by a link. The
> file url is:
> http://stagingserver/DCS/servlet/com.merant.wcm.engines.DownloadFile?folder=Cons_Ando_Pub&Cons_Ando_Pub_method=FS&fileID=1379
>
> If I open a new browser and copy/paste this URL, I get an HTTP 500 error
> with all types of Java errors. I'm assuming this is because I haven't
> authenticated in the new browser window. If I click on the link after I
> authenticate, then I get to the file successfully. I'm assuming that I have
> to launch this link from inside the instance of IE that I'm navigating down,
> since that session has been authenticated.
>
> I was trying to use MS's XMLHTTP to grab the file (see the following code
> that should grab the file):
> set oHTTP = CreateObject("msxml2.XMLHTTP")
> oHTTP.open "GET", sSrcUrl, False
> oHTTP.send
>
> I need to be able to take this URL, and save the resulting file into a
> specific directory under a specific filename. Can anyone help me?
>
> Thank you!
>
> -- Kent Iler
> ----------------------------------------------------------------------
> kent@iler.NOSPAM.com
> Please CC: all replies via e-mail
> Remove .NOSPAM from e-mail address
- Next message: Mann: "Using vbscript to determin what user name is being used"
- Previous message: Torgeir Bakken (MVP): "Re: How to find current directory"
- In reply to: Chris Barber: "Re: Please help! How do I download a binary file from URL when link needs to be launched from inside browser after authentication?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|