On a new Angular 4 project is possible to create a simple text File object 
from its constructor:

    const textfile = new File (['abcd'], 'text.txt')
    console.log(textfile)

    
inspecting the console output (VSCode console) shows the expected result:

    File(13) {name: "text.txt", lastModified: 1520684955392, 
lastModifiedDate: Sat Mar 10 2018 13:29:15 GMT+0100 (Standard romance time…, 
webkitRelativePath: "", size: 13, …}
        lastModified:1520684955392
        lastModifiedDate:Sat Mar 10 2018 13:29:15 GMT+0100 {}
        name:"text.txt"
        size:13
        type:"text/plain"
        webkitRelativePath:""
        __proto__:File {name: <accessor>, lastModified: <accessor>, 
lastModifiedDate: <accessor>, …}


This exact line of code on a new blank Ionic 3 project outputs a misplaced 
or wrong properties instance of File interface ("name" is an Array holding 
text content, there's no "name" property, "localURL" contains the file 
name, "start" "size" and "end" properties are 0, ...).

    File {name: Array(1), localURL: "text.txt", type: null, lastModified: 
null, lastModifiedDate: null, …}
    end:0
    lastModified:null
    lastModifiedDate:null
    localURL:"text.txt"
    name:Array(1) ["text"]
    size:0
    start:0
    type:null
    __proto__:Object {slice: , constructor: }


Tried to simplify my question as much as I could, tested on diferent 
computers and checked Angular and Ionic stable versions. I have served this 
project to the local browser to avoid device or emulator interference.  

I wonder if this is a by-design behavior, a bug on Ionic's Angular 
implementation or a wrong use of this feature.

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to