【发布时间】:2018-12-27 10:08:01
【问题描述】:
在 Internet Explorer 中,当我尝试上传更大的视频文件 (70MB) 时,FileReader.onload this.result(在我的代码中:event.target['result'])为空。
reader.onload = function (event) {
if (event && event.target) {
if (event.target['result']) {
that._file.id = that.id;
that._file.src = uploadedFile.file;
that.attachmentForm.controls['fileName'].patchValue(
uploadedFile.file.name
);
that._file.description = uploadedFile.file.name;
that._file.fileType = uploadedFile.file.type;
that._file.deleteFlag = false;
that._file.fileExtension = that.getExtensionFromFileName(
uploadedFile.file.name
);
that.fileUploaded.emit(that._file);
} else {
that.error_message = FileUploadErrors.file_corrupted;
}
}
};
if (uploadedFile.file) {
reader.readAsDataURL(uploadedFile.file);
}
当我尝试上传大约 30MB 的文件时,它工作正常。 Windows 能够播放所有视频。 Chrome,firefox 与此代码配合得很好。有什么想法,问题出在哪里?
【问题讨论】: