I'm using this code to view a .PDF that is stroed in a DB:
but I'm having trouble getting the filesize in the Response.AddHeader("Content-Length", strFileName)Code:Response.ContentType = "application/octet-stream" ' let the browser know the file name Response.AddHeader("Content-Disposition", "attachment;filename=" & Trim(pdf)) ' let the browser know the file size Response.AddHeader("Content-Length", strFileName) Response.BinaryWrite(objDR("bid_document"))
the only way I can get the file size is objDR("pdfFile") but then I can't place that value in there becasue you can't convert Byte() array to a string...any suggestions on how I can get the file size? If I put it in manually it works fine...




Reply With Quote