Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Detecting file type for a Flash file
Message
From
13/12/2005 23:24:35
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Detecting file type for a Flash file
Miscellaneous
Thread ID:
01077743
Message ID:
01077743
Views:
58
I have this function to detect the file type of an image:
* Returne the file type
FUNCTION FileType
PARAMETER tcData
LOCAL lcReturn,lcString
lcString=FILETOSTR(tcData)
DO CASE 
   CASE LEN(lcString)<4
      lcReturn=''
   CASE LEFT(lcString,3)=CHR(0xFF)+CHR(0xD8)+CHR(0xFF)
      lcReturn='JPG'
   CASE LEFT(lcString,3)='GIF'
      lcReturn='GIF'
   CASE SUBSTR(lcString,42,3)='EMF'
      lcReturn='EMF'
   CASE LEFT(lcString,4)=CHR(0xD7)+CHR(0xCD)+CHR(0xC6)+CHR(0x9A)
      lcReturn='WMF'
   CASE LEFT(lcString,4)=CHR(0x4D)+CHR(0x4D)+CHR(0x00)+CHR(0x2A)
      lcReturn='TIF'
   CASE LEFT(lcString,4)=CHR(0x89)+'PNG'
      lcReturn='PNG'
   CASE LEFT(lcString,2)='BM'
      lcReturn='BMP'
   OTHERWISE 
      lcReturn=''
ENDCASE 
RETURN lcReturn
Anyone would know what I could add in there to detect the file type for a Flash file? They have the extension SWF.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Next
Reply
Map
View

Click here to load this message in the networking platform