dcsimg
Results 1 to 2 of 2

Thread: Problem with the download of big files. ADODB.Stream?

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2018
    Posts
    1

    Angry Problem with the download of big files. ADODB.Stream?

    Hi, I'm compiling this part of the code, but as long as I download the data under 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 %>

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    40,118

    Re: Problem with the download of big files. ADODB.Stream?

    Welcome to VBForums

    Thread moved from the 'VB.Net' forum to the 'VBScript' forum

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width