Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

json.stringify file object return {}

// get File Object  
var fileObject = getFile();

// reCreate new Object and set File Data into it
var newObject  = {
   'lastModified'     : fileObject.lastModified,
   'lastModifiedDate' : fileObject.lastModifiedDate,
   'name'             : fileObject.name,
   'size'             : fileObject.size,
   'type'             : fileObject.type
};  

// then use JSON.stringify on new object
JSON.stringify(newObject);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #file #object #return
ADD COMMENT
Topic
Name
9+4 =