Problem with the download of big files

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • samuelpa99
    New Member
    • Aug 2018
    • 1

    Problem with the download of big files

    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.

    Code:
    <%@LANGUAGE = VBScript%>
    <% ' Recupero il file da scaricare
    Dim download, files
    
    if request("tf")=1 then ' file programmazione
    files="/public/itcsantagata/programmazione/" & Request.QueryString("file")
    elseif request("tf")=2 then 'file progra
    files="/public/itcsantagata/programsostegno/" & Request.QueryString("file")
    elseif request("tf")=3 then 'file progetti
    files="/public/itcsantagata/progetti/" & Request.QueryString("file")
    elseif request("tf")=4 then 'file dip. disciplinari
    files="/public/itcsantagata/dip_disciplinari/" & Request.QueryString("file")
    elseif request("tf")=5 then 'file circolari
    files="/public/itcsantagata/circolari/" & Request.QueryString("file")
    elseif request("tf")=6 then 'file decreti
    files="/public/itcsantagata/decreti/" & Request.QueryString("file")
    elseif request("tf")=7 then 'file modulistica
    files="/public/itcsantagata/modulistica/" & Request.QueryString("file")
    elseif request("tf")=8 then 'file verbali cons
    files="/public/itcsantagata/verbcons/" & Request.QueryString("file")
    elseif request("tf")=9 then 'file curriculum
    files="/public/itcsantagata/curriculum/" & Request.QueryString("file")
    elseif request("tf")=10 then 'file musica mp3
    files="/public/itcsantagata/coro/" & Request.QueryString("file")
    elseif request("tf")=11 then 'file formclero
    files="/public/itcsantagata/formclero/" & Request.QueryString("file")
    elseif request("tf")=12 then 'file ufficio liturgico
    files="/public/itcsantagata/ufflitur/" & Request.QueryString("file")
    end if
    
    ' Creo l'oggetto ADODB.Stream
    Set download = Server.CreateObject("ADODB.Stream")
    
    ' Apro la connessione e carico il file
    download.Type = 1
    download.Open
    download.LoadFromFile Server.MapPath(files)
    
    'Aggiungo le intestazioni del tipo di file
    Response.AddHeader "Content-Disposition", "attachment; filename=" & Request.QueryString("file")
    Response.ContentType = "application/octet-stream"
    Response.BinaryWrite download.Read
    
    download.Close
    Set download = Nothing %>
    Last edited by zmbd; Aug 29 '18, 05:06 AM. Reason: [z{Please do NOT double post your questions}{Merged double post - no redirect}]
Working...