Hi
frustrated now
 
this code allows users to download files specific to the company they are part of
it all works fine for every file type BUT Mpgs
 
I get an HTML file down instead of the requested file .. but the file download dialog knows its an Mpeg but the save as dialog box thinks its an HTML file
 
anyone know why?
 
Thanks 
 
---------------------------------------------------------------------------------------------------------------------------
<cfif isdefined("session.UserID")>
     <cflock scope="session" timeout="10">
           <cfset request.userId = session.userId>
            <cfset request.CompanyId = session.companyID>
      </cflock>
 
 
    <cfquery datasource="#datasource#" name="getuser" dbtype="odbc"  dbserver="#dbserver#"   username="#dbusername#" password="#password#">
     Select userName
        from tbluser01
        where companyId = #request.companyID#
        and userId  = #request.userId#
  </cfquery>
 
<cfif getuser.recordcount EQ 1>
        <cfquery datasource="****" dbserver="*****"   username="****" password="**" name="getfile">
           Select *
                from tblfile01 #
                where fileID = #val(url.FileId)#
                and companyId =#request.companyId# 
         </cfquery>
   
    <cfheader name="Content-Disposition" value="attachment;filename=#trim(getfile.fileName)#">
    <CFCONTENT TYPE="application/unknown" DELETEFILE="No"
        FILE="***\secure\#trim(getfile.Filelocation)##trim(getfile.Filename)#" RESET="Yes">
    <cfelse>
        <script>
            self.close();
        </script>
  </cfif>
 
<cfelse>
      <script>
        self.close();
    </script>
</cfif>
 
 
|\--------------------/|
Matt Horn
Web Applications Developer
Ph:+2782 424 3751
W: http://www.matt-horn.org
E:[EMAIL PROTECTED]
|\--------------------/|

Reply via email to