Code Bank
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingCode Bank

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old June 17th, 2005, 06:29 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
Click here for more information.
 
Join Date: Sep 2004
Location: Israel
Posts: 26,993 Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)  Folding Points: 342508 Folding Title: Super Ultimate Folder - Level 1Folding Points: 342508 Folding Title: Super Ultimate Folder - Level 1Folding Points: 342508 Folding Title: Super Ultimate Folder - Level 1Folding Points: 342508 Folding Title: Super Ultimate Folder - Level 1Folding Points: 342508 Folding Title: Super Ultimate Folder - Level 1Folding Points: 342508 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Months 1 Week 5 Days 16 h 39 m 38 sec
Reputation Power: 1557
Post Download Manager: downloading files from secure location (classic ASP)

use this code to download files from secure folder on the server i.e. folder which is not accessible from the website.
this allow you to:
1. protect files by adding user validation to the page.
2. count how many times each file has been downloaded.
the code is provided as-is only change the constant of the secure folder path.
two download methods are available: "normal" download which send the file to the browser as-is (e.g. if it's htm/text it would open in the browser itself) or "force download" mode in which the Save As dialog box appear and user can save the file.
Code:
--DownloadManager.asp
<% Option Explicit %>
<% Response.Buffer=True %>
<%
'Constants
Const FOLDER_PATH="c:\Secure" 'full path to the secure folder
Const adTypeBinary = 1
Const adTypeText = 2
Const chunkSize = 2048

'global variables:
Dim strFileName 'name of the file to be downloaded
Dim blnForceDownload 'force the download or allow the file to be opened in the browser?

'read file from querystring:
strFileName=Request("file")

'force download?
blnForceDownload = (Request("force")="true")

'execute the function if we got anything:
If Len(strFileName)>0 Then
	Call DownloadFile (strFileName, blnForceDownload)
	Response.END
End If

Sub DownloadFile(strFileName, blnForceDownload)
	'local variables:
	Dim fso, objFile, strFilePath
	Dim fileSize, blnBinary, strContentType
	Dim objStream, strAllFile, iSz
	Dim i
	
	'----------------------
	'first step: verify the file exists
	'----------------------
	
	'build file path:
	strFilePath=FOLDER_PATH
	' add backslash if needed:
	If Right(strFilePath, 1)<>"\" Then strFilePath=strFilePath&"\"
	strFilePath=strFilePath&strFileName
	
	'initialize file system object:
	Set fso=Server.CreateObject("Scripting.FileSystemObject")
	
	'check that the file exists:
	If Not(fso.FileExists(strFilePath)) Then
		Set fso=Nothing
		Err.Raise 20000, "Download Manager", "Fatal Error: file does not exist: "&strFilePath
		Response.END
	End If
	
	'----------------------
	'second step: get file size.
	'----------------------
	Set objFile=fso.GetFile(strFilePath)
	fileSize=objFile.Size
	Set objFile=Nothing
	
	'----------------------
	'third step: check whether file is binary or not and get content type of the file. (according to its extension)
	'----------------------
	blnBinary=GetContentType(strFileName, strContentType)
	strAllFile=""
	
	'----------------------
	'forth step: read the file contents.
	'----------------------
	'force download? if so, add proper header:
	If blnForceDownload Then
	    	Response.AddHeader "Content-Disposition", "attachment; filename="&strFileName
	End If
	If blnBinary Then
		Set objStream=Server.CreateObject("ADODB.Stream")
		
		'Added to breakup chunk
		Response.Buffer = False 
		
		'this might be long...
	    	Server.ScriptTimeout = 30000
		

		
		'----------------------
		objStream.Open
		objStream.Type = 1 'adTypeBinary
		objStream.LoadFromFile strFilePath
		
		'Added to breakup chunk
		iSz = objStream.Size
		Response.AddHeader "Content-Length", iSz
		Response.Charset = "UTF-8"
		Response.ContentType = strContentType
		For i = 1 To iSz \ chunkSize
			If Not Response.IsClientConnected Then Exit For
			Response.BinaryWrite objStream.Read(chunkSize)
		Next 
		If iSz Mod chunkSize > 0 Then 
			If Response.IsClientConnected Then 
				Response.BinaryWrite objStream.Read(iSz Mod chunkSize)
			End If 
		End If
  		objStream.Close
		Set objStream = Nothing		
		'--------------------------------------
		'Commented out Original Code
		'strAllFile=objStream.Read(fileSize)
		'objStream.Close
		'Set objStream = Nothing
		'--------------------------------------
	Else  
		Set objFile=fso.OpenTextFile(strFilePath,1) 'forReading
		If Not(objFile.AtEndOfStream) Then
			strAllFile=objFile.ReadAll
		End If
		objFile.Close
		Set objFile=Nothing
		Response.Write(strAllFile)
	End If
	
	'clean up:
	Set fso=Nothing
	Response.Flush
	Response.END
End Sub

Function GetContentType(ByVal strName, ByRef ContentType)
	'return whether binary or not, put type into second parameter
	Dim strExtension
	strExtension="."&GetExtension(strName)
	Select Case strExtension
		Case ".asf"
			ContentType = "video/x-ms-asf"
			GetContentType=True
		Case ".avi"
			ContentType = "video/avi"
			GetContentType=True
		Case ".doc"
			ContentType = "application/msword"
			GetContentType=True
		Case ".zip"
			ContentType = "application/zip"
			GetContentType=True
		Case ".xls"
			ContentType = "application/vnd.ms-excel"
			GetContentType=True
		Case ".gif"
			ContentType = "image/gif"
			GetContentType=True
		Case ".jpg", ".jpeg"
			ContentType = "image/jpeg"
			GetContentType=True
		Case ".wav"
			ContentType = "audio/wav"
			GetContentType=True
		Case ".mp3"
			ContentType = "audio/mpeg3"
			GetContentType=True
		Case ".wma" 
			ContentType = "audio/wma"
			GetContentType=True
		Case ".mpg", ".mpeg"
			ContentType = "video/mpeg"
			GetContentType=True
		Case ".pdf"
			ContentType = "application/pdf"
			GetContentType=True
		Case ".rtf"
			ContentType = "application/rtf"
			GetContentType=True
		Case ".htm", ".html"
			ContentType = "text/html"
			GetContentType=False
		Case ".asp"
			ContentType = "text/asp"
			GetContentType=False
		Case ".txt"
			ContentType = "text/plain"
			GetContentType=False
		Case Else
			'Handle All Other Files
			ContentType = "application/octet-stream"
			GetContentType=True
	End Select
End Function

Function GetExtension(strName)
	Dim arrTmp
	arrTmp=Split(strName, ".")
	GetExtension=arrTmp(UBound(arrTmp))
End Function
%>


Code:
--DownloadExample.asp
<html>
<head>
<title>Download File Example</title>
</head>
<body>
<a href="DownloadManager.asp?file=testfile.txt&force=false">Download file without forcing Save As box</a><br />
<a href="DownloadManager.asp?file=testfile.txt&force=true">Download file (forcing Save As box)</a>
</body>
</html>


edit: (23/10/2006)
Thanks to mehere, I have improved the code so that it can
force the download of big files. credit is given to this article:
http://classicasp.aspfaq.com/genera...-mime-type.html

edit: (13/11/2006)
Thanks to red_fiesta, I have fixed the code so that files can
also be opened by the browser, without forcing download.
Comments on this post
crazyace agrees: Great post this will come in handy
Dr_Rock agrees: Very nice, good stuff!
Attached Files
File Type: zip DownloadManager.zip (2.1 KB, 769 views)

Last edited by Shadow Wizard : November 13th, 2006 at 05:42 AM.

Reply With Quote
  #2  
Old July 4th, 2006, 07:28 AM
esthera esthera is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 79 esthera User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 56 m 54 sec
Reputation Power: 5
I tried teh code located at http://forums.aspfree.com/code-bank...t=download+file

it works great for showing the file but when I try it with forcedownload=true it just shows garbage on the browser and I don't get any save to disk option.

why?

Last edited by Shadow Wizard : July 4th, 2006 at 07:55 AM.

Reply With Quote
  #3  
Old July 4th, 2006, 07:56 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
Click here for more information.
 
Join Date: Sep 2004
Location: Israel
Posts: 26,993 Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)  Folding Points: 342508 Folding Title: Super Ultimate Folder - Level 1Folding Points: 342508 Folding Title: Super Ultimate Folder - Level 1Folding Points: 342508 Folding Title: Super Ultimate Folder - Level 1Folding Points: 342508 Folding Title: Super Ultimate Folder - Level 1Folding Points: 342508 Folding Title: Super Ultimate Folder - Level 1Folding Points: 342508 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Months 1 Week 5 Days 16 h 39 m 38 sec
Reputation Power: 1557
I double checked it now and it works fine.
post your code and I'll try to help you find and solve the problem.

Reply With Quote
  #4  
Old July 4th, 2006, 07:59 AM
esthera esthera is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 79 esthera User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 56 m 54 sec
Reputation Power: 5
my code is almost identical to yours - i just call the function not using the request object.
it works if i call dowloadfile with false but if I set it to true I get garbage on the webbrowser and no save to disk prompt.
Code:
<% Option Explicit %>
<% Response.Buffer=True %>

<%

Call DownloadFile ("test.pdf",true)
 
Const FOLDER_PATH="D:\esther\files\" 'full path to the secure folder
Dim strFileName 'name of the file to be downloaded
strFileName=Request("file")



Sub DownloadFile(strFileName, blnForceDownload)
	Dim fso, objFile, strFilePath
	Dim fileSize, blnBinary, strContentType
	Dim objStream, strAllFile
	
	'----------------------
	'first step: verify the file exists
	'----------------------
	
	'build file path:
	strFilePath=FOLDER_PATH
	' add backslash if needed:
	If Right(strFilePath, 1)<>"\" Then strFilePath=strFilePath&"\"
	strFilePath=strFilePath&strFileName
	
	'initialize file system object:
	Set fso=Server.CreateObject("Scripting.FileSystemObject")
	
	'check that the file exists:
	If Not(fso.FileExists(strFilePath)) Then
		Set fso=Nothing
		Err.Raise 20000, "Download Manager", "Fatal Error: file does not exist: "&strFilePath
		Response.END
	End If
	
	'----------------------
	'second step: get file size.
	'----------------------
	Set objFile=fso.GetFile(strFilePath)
	fileSize=objFile.Size
	Set objFile=Nothing
	
	'----------------------
	'third step: check whether file is binary or not and get content type of the file. (according to its extension)
	'----------------------
	blnBinary=GetContentType(strFileName, strContentType)
	strAllFile=""
	
	'----------------------
	'forth step: read the file contents.
	'----------------------
	If blnBinary Then
		Set objStream=Server.CreateObject("ADODB.Stream")
		objStream.Open
		objStream.Type = 1 'adTypeBinary
		objStream.LoadFromFile strFilePath
		strAllFile=objStream.Read(fileSize)
		objStream.Close
		Set objStream = Nothing
	Else  
		Set objFile=fso.OpenTextFile(strFilePath,1) 'forReading
		If Not(objFile.AtEndOfStream) Then
			strAllFile=objFile.ReadAll
		End If
		objFile.Close
		Set objFile=Nothing
	End If
	
	'----------------------
	'final step: apply content type and send file contents to the browser
	'----------------------
	If blnForceDownload="true" Then
		Response.AddHeader "Content-Disposition", "attachment; filename="&strFileName
	End If
	Response.AddHeader "Content-Length", fileSize
	Response.Charset = "UTF-8"
	Response.ContentType = strContentType
	If blnBinary Then
		Response.BinaryWrite(strAllFile)
	Else  
		Response.Write(strAllFile)
	End If
	
	'clean up:
	Set fso=Nothing
	Response.Flush
	Response.END
End Sub

Function GetContentType(ByVal strName, ByRef ContentType)
	'return whether binary or not, put type into second parameter
	Dim strExtension
	strExtension="."&GetExtension(strName)
	Select Case strExtension
		Case ".asf"
			ContentType = "video/x-ms-asf"
			GetContentType=True
		Case ".avi"
			ContentType = "video/avi"
			GetContentType=True
		Case ".doc"
			ContentType = "application/msword"
			GetContentType=True
		Case ".zip"
			ContentType = "application/zip"
			GetContentType=True
		Case ".xls"
			ContentType = "application/vnd.ms-excel"
			GetContentType=True
		Case ".gif"
			ContentType = "image/gif"
			GetContentType=True
		Case ".jpg", ".jpeg"
			ContentType = "image/jpeg"
			GetContentType=True
		Case ".wav"
			ContentType = "audio/wav"
			GetContentType=True
		Case ".mp3"
			ContentType = "audio/mpeg3"
			GetContentType=True
		Case ".mpg", ".mpeg"
			ContentType = "video/mpeg"
			GetContentType=True
		Case ".rtf"
			ContentType = "application/rtf"
			GetContentType=True
		Case ".htm", ".html"
			ContentType = "text/html"
			GetContentType=False
		Case ".asp"
			ContentType = "text/asp"
			GetContentType=False
		Case ".txt"
			ContentType = "text/plain"
			GetContentType=False
		Case Else
			'Handle All Other Files
			ContentType = "application/octet-stream"
			GetContentType=True
	End Select
End Function

Function GetExtension(strName)
	Dim arrTmp
	arrTmp=Split(strName, ".")
	GetExtension=arrTmp(UBound(arrTmp))
End Function
%> 


Reply With Quote
  #5  
Old July 4th, 2006, 08:27 AM
degsy degsy is offline
Contributing User
ASP Free God 2nd Plane (6000 - 6499 posts)
 
Join Date: Aug 2005
Location: North East, UK
Posts: 6,191 degsy User rank is First Lieutenant (10000 - 20000 Reputation Level)degsy User rank is First Lieutenant (10000 - 20000 Reputation Level)degsy User rank is First Lieutenant (10000 - 20000 Reputation Level)degsy User rank is First Lieutenant (10000 - 20000 Reputation Level)degsy User rank is First Lieutenant (10000 - 20000 Reputation Level)degsy User rank is First Lieutenant (10000 - 20000 Reputation Level)degsy User rank is First Lieutenant (10000 - 20000 Reputation Level)degsy User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 19 h 41 m 52 sec
Reputation Power: 121
Have you tried
Code:
DownloadFile ("test.pdf","true")


The script is checking for a string not a boolean.
__________________
CyberTechHelp

Reply With Quote
  #6  
Old July 4th, 2006, 08:35 AM
esthera esthera is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 79 esthera User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 56 m 54 sec
Reputation Power: 5
I tried and that didn't work -- it still outputs garbage to the screen with no save as

Quote:
Originally Posted by degsy
Have you tried
Code:
DownloadFile ("test.pdf","true")


The script is checking for a string not a boolean.

Reply With Quote
  #7  
Old July 4th, 2006, 09:15 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
Click here for more information.
 
Join Date: Sep 2004
Location: Israel
Posts: 26,993 Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)  Folding Points: 342508 Folding Title: Super Ultimate Folder - Level 1Folding Points: 342508 Folding Title: Super Ultimate Folder - Level 1Folding Points: 342508 Folding Title: Super Ultimate Folder - Level 1Folding Points: 342508 Folding Title: Super Ultimate Folder - Level 1Folding Points: 342508 Folding Title: Super Ultimate Folder - Level 1Folding Points: 342508 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Months 1 Week 5 Days 16 h 39 m 38 sec
Reputation Power: 1557
works fine for me with PDF files as well so can't see what is the problem.
try adding those lines to GetContentType function in DownloadManager.asp file:
Code:
Case ".pdf"
			ContentType = "application/pdf"
			GetContentType=True

Reply With Quote
  #8  
Old July 5th, 2006, 07:05 AM
esthera esthera is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 79 esthera User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 56 m 54 sec
Reputation Power: 5
thanks that did it..
now we also want to enable downloadinof a .max file (paperport) but currently it's not working -
it asked me to select what program to open the file with. I selected Paperport, but it still didn't work.


anyideas what I can do?

Reply With Quote
  #9  
Old July 5th, 2006, 08:00 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
Click here for more information.
 
Join Date: Sep 2004
Location: Israel
Posts: 26,993 Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)  Folding Points: 342508 Folding Title: Super Ultimate Folder - Level 1Folding Points: 342508 Folding Title: Super Ultimate Folder - Level 1Folding Points: 342508 Folding Title: Super Ultimate Folder - Level 1Folding Points: 342508 Folding Title: Super Ultimate Folder - Level 1Folding Points: 342508 Folding Title: Super Ultimate Folder - Level 1Folding Points: 342508 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Months 1 Week 5 Days 16 h 39 m 38 sec
Reputation Power: 1557
no idea what .max extension is, probably what needed to run it is not
installed on your computer either.
try Saving the file to your disk then Open it.

Reply With Quote
  #10  
Old October 23rd, 2006, 03:31 PM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
Click here for more information.
 
Join Date: Sep 2004
Location: Israel
Posts: 26,993 Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)  Folding Points: 342508 Folding Title: Super Ultimate Folder - Level 1Folding Points: 342508 Folding Title: Super Ultimate Folder - Level 1Folding Points: 342508 Folding Title: Super Ultimate Folder - Level 1Folding Points: 342508 Folding Title: Super Ultimate Folder - Level 1Folding Points: 342508 Folding Title: Super Ultimate Folder - Level 1Folding Points: 342508 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Months 1 Week 5 Days 16 h 39 m 38 sec
Reputation Power: 1557
code has been improved, now it can force the download of big files.
thanks mehere!

Reply With Quote
  #11  
Old November 11th, 2006, 08:31 AM
red_fiesta red_fiesta is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2006
Posts: 131 red_fiesta User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 2 h 49 m 48 sec
Reputation Power: 2
i used the code that was provided (at the top, the example) and

whether is use

Download file without forcing Save As box

or

Download file (forcing Save As box)

its brings up the save window...

please advise

thanks

Reply With Quote