angular - 上传大型视频文件时在角度 12 中请求超时
问题描述
上传大型视频文件时,我在 Angular 12 中遇到请求超时问题。(200 MB)
后端 API 没有问题,因为我已经用邮递员测试了 API,文件已上传。
当我从本地主机上传文件时。它也工作正常。
上传时服务器只有问题,随机超时
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { timeout } from 'rxjs/operators';
return this.http.post(uri,data,{ headers: this.headers}).pipe(
timeout(1000 * 60 * 60 * 60 ) //rxjs timeout operator
);
谢谢
解决方案
推荐阅读
- python - 使用 docker-compose 重置连接的烧瓶应用程序
- javascript - 如何获取浏览器转发页面 URL,如 document.referrer
- python - python api json childnode进入pandas数据框
- java - ECS 中的错误,在安装 jdk 期间“E:MergeList /jdk-15.0.2_linux-x64_bin.deb 出现问题”
- swift - 将 NSView 的鼠标向下坐标隐藏到可可 Swift 中的屏幕坐标系
- linear-regression - 梯度下降算法返回 b0 和 b1 的 nan 值
- javascript - 根据不同的 HTML 表格创建 Excel/CSV 列表
- javascript - 如何访问从 React 的另一个页面导入的函数中的变量?
- java - 如何在 Harmony OS 中为文本设置自定义字体样式,即设置 Harmony OS 中未预定义的新字体?
- matter.js - 如何在matter js中获取形状的颜色