Quais sao os tipos de Response.ContentType
tenho o seguinte codigo:
<%
' AspUpload Code samples: filelist_download.asp
' Invoked by filelist.asp
' Copyright (c) 2001 Persits Software, Inc.
' http://www.persits.com
' The file must not contain any HTML tags, not even HTML comment tags <!-- ...-->
' Build ADO connection string
'Connect = "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath(".\aspupload.mdb")
' If you use SQL Server, the connecton string must look something like this:
Connect = "Provider=SQLOLEDB;Server=FELIPE-PC\SQLEXPRESS;Database=DataBase;UID=sa;PWD=sa"
Set db = Server.CreateObject("ADODB.Connection")
db.Open Connect
SQL = "SELECT * FROM Uploads where id = " & Request("id")
Set rs = db.Execute( SQL )
If rs.EOF Then Response.End
Response.ContentType = "application/octet-stream"
' Let the browser know the file name
Response.AddHeader "Content-Disposition", "attachment;filename=" & Trim(rs("filename"))
' Let the browser know the file size
Response.AddHeader "Content-Length", CStr(rs("filesize"))
' Send actual file
Response.BinaryWrite rs("image_blob")
%>
beleza ate aí tudo .. bem ... eh um script q pega o arquivo q ta dentro do SQL SERVER ... mas quando o arquivo eh um WMA por exemplo eu nao consigo fazer o download... entao to achando que pode ser isso pelo ... Response.ContentType
ow nao ...?
Discussão (1)
Carregando comentários...