Open benjamincharity opened 6 years ago
This is the branch I have been using: https://github.com/GetTerminus/terminus-ui/tree/1094-fileupload-non-image-breaking-stream
Moving to Backlog and labeling On hold
Since TsFileUpload was built to support only one file, we're going to restructure the whole component, #1365.
In the meantime, Core is hacking around this problem, so it's not an active problem.
It seems that calling
FileReader.readAsDataURL()
on a file that is not an image causes an error that breaks the stream.It is likely that we should call
FileReader.readAsText()
when dealing with non-image files.Call in question: https://github.com/GetTerminus/terminus-ui/blob/master/terminus-ui/file-upload/src/selected-file.ts#L217
Need to wrap in
if
to call the correct method for the type of file.