Hi
really sorry
I diont understand a word of that document
how do I impliment a solution based on whats in that URL given the current code?
 
I am not asking for a complete solution .. just a pointer or two :D
 
 
 
Thanks again
 
 
----- Original Message -----
Sent: Wednesday, April 21, 2004 4:09 PM
Subject: RE: [ cf-dev ] Odd thing happening

Check
 
 
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