c# - 在 Rest Api C# 中将大字节数组添加到 Post 请求参数
问题描述
我在常规帖子 Api 中有一个 Post 方法
public async Task<IHttpActionResult> Postt([FromBody]Parameter parameter)
{
}
public class Parameter
{
public DateTime ValueDate { get; set; }
public byte[] Blob { get; set; }
}
当 Blob 太大(从二进制文件中读取)时,我可能会收到 null,并且 ModelState 处于无效状态。
任何猜测或替代?
解决方案
推荐阅读
- postgresql - 使用 PrismaJS 和 NestJS 时模式模型类型的问题
- c# - Angular Http 发布请求无法到达 C# 端点
- python - 在 MSYS2 上安装 pyaudio(损坏的 c 文件)
- python - ValueError:“连接”层需要具有匹配形状的输入,连接轴除外。得到输入形状:[(None, 36, 36, 128) 等
- cocoapods - Xcode Podfile.lock 显示 Visual Code Studio 徽标?
- python - DateTime 过滤器返回错误的结果
- javascript - 获取 React hooks 中的输入值并打印出来
- python - 如何根据Django中相同模型的其他字段ID过滤字段值
- excel - 条件格式不适用于用颜色填充单元格范围
- java - 从 Spring Boot Java Web API 调用本地/服务器节点 JS 应用程序