19
Jun/090
Jun/090
Forçando Downloads com ASP
public function download(arquivo, pasta)
dim objStream
set objStream = server.createObject("ADODB.Stream")
with (response)
.buffer = true
.addHeader "Content-Type","application/x-msdownload"
.addHeader "Content-Disposition","attachment; filename="&arquivo
.flush
end with
with (objStream)
.open
.type = 1
.loadFromFile server.mapPath(pasta)
end with
response.binaryWrite objStream.read
set objStream = nothing
response.flush
end function
Página 1 de 11


