1 Reply Latest reply on Jun 22, 2009 12:46 AM by migailov

    Get file system metadata from a file




      For a research project I am looking for a way to collect the file system metadata of a certain file.

      The user selects a file on his system and the app retrieves the metadata of the file, only the metadata and not the actual contents.

      A friend of mine made a test app using SWFupload (www.swfupload.org) and it works, however not all attributes from the metadata can be retrieved.
      I would also want to collect 'lastaccesstime' and 'owner' from the metadata.
      Try the test app here: http://alwinschoemaker.nl/bax/


      The following code has been used to make this test app:


      function fileDialogComplete() {
      var f = this.getFile();
      var a = "File Info \n";
      a += "Created: " + f.creationdate + "\n";
      a += "Modification: " + f.modificationdate + "\n";
      a += "Filename: " + f.name + "\n";
      a += "Filesize: " + f.size + "\n";
      a += "Filetype: " + f.type + "\n";

      a = '' + a + '';
      document.getElementById('results').innerHTML = a;


      The current version of the File Object does not support any more attributes from the metadata:


      id : string,               // SWFUpload file id, used for starting or cancelling and upload
      index : number,               // The index of this file for use in getFile(i)
      name : string,               // The file name. The path is not included.
      size : number,               // The file size in bytes
      type : string,               // The file type as reported by the client operating system
      creationdate : Date,          // The date the file was created
      modificationdate : Date,     // The date the file was last modified
      filestatus : number,          // The file's current status. Use SWFUpload.FILE_STATUS to interpret the value.



      Is there some way to extend these functionalities, or does anybody know a workaround?