שלח תשובה

זירת השאלות

469
צפיות
3
תשובות

Response.BinaryWrite

,‏ 1 בספטמבר, 2004

אני משתמש ב IIS6 וקיימת מגבלה של 4M ב( Response.BinaryWrite s.Read) כיצד ניתן להוריד קבצים גדולים מ 4M בעזרת Response.BinaryWrite ?

תגיות:

3 תשובות

  1. אוריקס הגיב:

    המממ
    שנה את


    Response.Buffer = True

    ל
    Response.Buffer = False

  2. amir2020 הגיב:

    עדיין לא עובד, מצורף קוד לדוגמא

    <%
    function downloadFile(strFile)

    strFilename = strFile

    ' clear the buffer
    Response.Buffer = False
    Response.Clear

    ' create stream
    Set s = Server.CreateObject("ADODB.Stream")
    s.Open

    ' set as binary
    s.Type = 1

    ' check the file exists
    Set fso = Server.CreateObject("Scripting.FileSystemObject")

    ' get length of file
    Set f = fso.GetFile(strFilename)
    intFilelength = f.size

    s.LoadFromFile(strFilename)

    ' send the headers to the users browser
    Response.AddHeader "Content-Disposition", "attachment; filename=" & f.name
    Response.AddHeader "Content-Length", intFilelength
    Response.Charset = "UTF-8"

    Response.ContentType = "application/octet-stream"

    ' output the file to the browser
    Response.BinaryWrite s.Read
    Response.Flush

    s.Close
    Set s = Nothing

    end function

    %>

    False ברגע ששיניתי ל
    לא נפתח חלון השמירה של של הקובץ

    מה ניתן לעשות כדי שיהיה ניתן להוריד קבצים מעל 4 מגה

שלח תשובה