使用.netcore2.1 做文件上传时,要求是小于20M,上传3至5M都没问题,大于10M,提示错误【如标题】,原来是nginx配置的原因

        [HttpPost("Postcard")]
[RequestSizeLimit(20000000)] //文件最大为20M
public async Task<WebApiResult> PostCard(CardType cardType, string userName)
{ }

  

  解决方法:

  打开nginx反向代理服务器nginx.conf配置文件,修改client_max_body_size值,client_max_body_size 20M。

上传图片报错-Failed to load resource:the server responded with a status of 413(Request Entity Too Large)的更多相关文章

  1. Failed to load resource: the server responded with a status of 413 (Request Entity Too Large)

    Node应用,使用formidable处理文件上传,本地测试没有问题,部署到服务器上之后上传大文件浏览器收到以下错误信息: Failed to load resource: the server re ...

  2. 报错解决——Failed to load resource: the server responded with a status of 404 (Not Found) favicon.ico文件找不到

    Django项目开发完成后在本地运行没问题,但在推到服务器上后出现报错Failed to load resource: the server responded with a status of 40 ...

  3. jsp中引入jquery报错:Failed to load resource: the server responded with a status of 404 (Not Found)

    问题描述: 今天自己在搭建spring.springMVC.hibernate框架,搭建完成后,在引入jquery时,发现jquery不管用.我的解决顺序是: 1.检查路径,发现路径没错,另外需要注意 ...

  4. Failed to load resource: the server responded with a status of 404 (Not Found)

    Failed to load resource: the server responded with a status of 404 (Not Found) 报错情况:图标加载失败 原因分析:路径错误 ...

  5. 待解决:2bootstrap-cerulean.css Failed to load resource: the server responded with a status of 404 ()

    2bootstrap-cerulean.css Failed to load resource: the server responded with a status of 404 ()

  6. Spring Boot Failed to load resource: the server responded with a status of 404 ()

    出现错误: Failed to load resource: the server responded with a status of 404 () 但是其他页面正常显示: 原因: 浏览器看一下:  ...

  7. ripple Failed to load resource: the server responded with a status of 404 (Not Found)

    在VS2015中使用Cordova + typescript开发中,遇到个问题. 在javascript console 中提示: Failed to load resource: the serve ...

  8. Failed to load resource: the server responded with a status of 404 ()

    今天遇到了一个一开始感觉很莫名其妙的报错 在编写页面的时候把原先写在html页面里的js代码单独拿出来做成一个JavaScriptUtil文件,放在了和html页面同一个目录下.运行之后在对应的页面c ...

  9. SSM框架下 Failed to load resource: the server responded with a status of 404 (Not Found)错误

    这个错误提示的是js的引用路径有错: 1.检查应用路径是否正确(我的问题是路径是正确的但是去到页面就会提示404错误) 引用路径,最好都使用绝对路径 <script type="tex ...

随机推荐

  1. day 22 面向对象的基础

    面向对象: 1.简述编写和执行类中的方法的流程 class Foo: #类的编写 def func(): print("我爱你") obj = Foo() #类的调用和执行 obj ...

  2. node.js+react全栈实践

    利用业余时间写了个简单的项目,使用react+node.js做的一个全栈实践项目,前端参考了[React-Admin-Starter](https://github.com/veryStarters/ ...

  3. 【Android - IPC】之AIDL简介

    参考资料: 1.<Android开发艺术探索>第二章2.4.4 2.Android AIDL Binder框架解析:http://blog.csdn.net/lmj623565791/ar ...

  4. 设置颜色的函数:rgb,hsv,color palettes

    1.grb函数 (1)功能: 通过对给定的三个基本色红,绿,蓝的颜色饱和度(intensity)的设定,而创造颜色. 阿尔法透明度(alpha transparent):其值也能被指定,从0到max ...

  5. 手机端web(iPad)页面自适应js

    有关编写手机页面(ipad页面)自适应的方法有很多,比如:bootstrap,rem等等.下面分享给大家一个js控制viewPort视区自适应缩放的方法(我给它命名为phone.js): 将phone ...

  6. Linux高级知识

    Linux高级知识 十一.LAMP架构 1.LAMP架构介绍.MySQL.MariaDB介绍.MySQL安装 2.MariaDB和Apache安装 3.安装PHP5和PHP7 4.Apache和PHP ...

  7. Docker虚拟化之<基础命令>

    1.在docker hub中搜索镜像 docker search nginx 2.从docker镜像服务器拉取指定镜像或者库镜像 docker pull docker.io/nginx 3.列出系统当 ...

  8. LeetCode-7.reverse-integer 【翻转字符串】【数学】

    PS: 第一次写文章好累啊,没想到这么短的文章写完这么累,大家给我点反馈,多给我留言啊.

  9. Nginx专题(2):Nginx的负载均衡策略及其配置

    本文介绍了Nginx的负载均衡策略,一致性hash分配原理,及常用的故障节点的摘除与恢复配置. 文章来源:宜信技术学院 & 宜信支付结算团队技术分享第一期-宜信支付结算八方数据团队高级技术经理 ...

  10. swift实现单例的四种方式

    单例模式 单例模式是设计模式中最简单的一种,甚至有些模式大师都不称其为模式,称其为一种实现技巧,因为设计模式讲究对象之间的关系的抽象,而单例模式只有自己一个对象. 当你只需要一个实例的时候需要使用单例 ...