Exposing the vanilla File object in FileItem? #429

Open
opened 2016-10-02 03:55:12 +00:00 by xwb1989 · 0 comments
xwb1989 commented 2016-10-02 03:55:12 +00:00 (Migrated from github.com)

Hi,

I'm trying to use this upload module, and before hitting the upload button, I want to see what's actually in the file. After playing around with it for a while, I found I can use the built-in FileReader#readAsText to read the
FileItem._file object to get the content of the file. However, I feel it kind of hack, because I thought fields beginning with _ are supposed to be private. Therefore I'm wondering whether there is any plan to expose that vanilla file object more formally, or even better, to expose some new API wrapping the FileReader?

Hi, I'm trying to use this upload module, and before hitting the upload button, I want to see what's actually in the file. After playing around with it for a while, I found I can use the built-in FileReader#readAsText to read the `FileItem._file` object to get the content of the file. However, I feel it kind of hack, because I thought fields beginning with `_` are supposed to be private. Therefore I'm wondering whether there is any plan to expose that vanilla file object more formally, or even better, to expose some new API wrapping the FileReader?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dc/ng2-file-upload#429