Ciao a tutti.
Io uso questo script per il download dei file:
codice:
Set objStream = Server.CreateObject("ADODB.Stream")
objStream.Type = adTypeBinary
objStream.Open
Set objFSO = Server.CreateObject ("Scripting.FileSystemObject")
If objFSO.FileExists(Server.MapPath(PathFile)) then
objStream.LoadFromFile Server.MapPath(PathFile)
Response.ContentType = "octet/stream"
Response.AddHeader "Content-Disposition", "attachment;filename=" & NomeFile
Response.BinaryWrite objStream.Read
End If
Set objFSO = Nothing
objStream.Close
Set objStream = Nothing
Ha problemi, però, se il nome del file ha degli spazi. Per caso c'è una soluzione?