1 Reply Latest reply on Sep 5, 2008 2:20 AM by anirudhs

    File Mimetype/Extension and media metadata

    xx87r
      Hello-
      How would you get...
      1. A file's extension?
      2. A file's mimetype?
      3. The meta data of a media file?

      Thanks.
        • 1. Re: File Mimetype/Extension and media metadata
          anirudhs Level 2
          Hi,

          You can get the file extension by using fileobj.extension where fileobj is an instance of class File.

          I don't think there is a way to get the file's mimetype.

          You can get metadata about an MP3 file using the flash.media.Sound class. There's no built-in way to get metadata about images without loading them fully into a Loader or Image control.

          Though you can actually examine the file's contents to get the metadata. (That will be format specific and there are no libraries to help you out)