423,350 Members | 2,519 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 423,350 IT Pros & Developers. It's quick & easy.

Problem with the download of big files

P: 1
Hi, I'm compiling this part of the code, but as long as I download the data within the 5mb everything works, surpassed that threshold no longer works. Can you help me? here is the code.

Expand|Select|Wrap|Line Numbers
  1. <%@LANGUAGE = VBScript%>
  2. <% ' Recupero il file da scaricare
  3. Dim download, files
  4.  
  5. if request("tf")=1 then ' file programmazione
  6. files="/public/itcsantagata/programmazione/" & Request.QueryString("file")
  7. elseif request("tf")=2 then 'file progra
  8. files="/public/itcsantagata/programsostegno/" & Request.QueryString("file")
  9. elseif request("tf")=3 then 'file progetti
  10. files="/public/itcsantagata/progetti/" & Request.QueryString("file")
  11. elseif request("tf")=4 then 'file dip. disciplinari
  12. files="/public/itcsantagata/dip_disciplinari/" & Request.QueryString("file")
  13. elseif request("tf")=5 then 'file circolari
  14. files="/public/itcsantagata/circolari/" & Request.QueryString("file")
  15. elseif request("tf")=6 then 'file decreti
  16. files="/public/itcsantagata/decreti/" & Request.QueryString("file")
  17. elseif request("tf")=7 then 'file modulistica
  18. files="/public/itcsantagata/modulistica/" & Request.QueryString("file")
  19. elseif request("tf")=8 then 'file verbali cons
  20. files="/public/itcsantagata/verbcons/" & Request.QueryString("file")
  21. elseif request("tf")=9 then 'file curriculum
  22. files="/public/itcsantagata/curriculum/" & Request.QueryString("file")
  23. elseif request("tf")=10 then 'file musica mp3
  24. files="/public/itcsantagata/coro/" & Request.QueryString("file")
  25. elseif request("tf")=11 then 'file formclero
  26. files="/public/itcsantagata/formclero/" & Request.QueryString("file")
  27. elseif request("tf")=12 then 'file ufficio liturgico
  28. files="/public/itcsantagata/ufflitur/" & Request.QueryString("file")
  29. end if
  30.  
  31. ' Creo l'oggetto ADODB.Stream
  32. Set download = Server.CreateObject("ADODB.Stream")
  33.  
  34. ' Apro la connessione e carico il file
  35. download.Type = 1
  36. download.Open
  37. download.LoadFromFile Server.MapPath(files)
  38.  
  39. 'Aggiungo le intestazioni del tipo di file
  40. Response.AddHeader "Content-Disposition", "attachment; filename=" & Request.QueryString("file")
  41. Response.ContentType = "application/octet-stream"
  42. Response.BinaryWrite download.Read
  43.  
  44. download.Close
  45. Set download = Nothing %>
4 Weeks Ago #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.