使用.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. ES6扩展运算符...

    对象的扩展运算符理解对象的扩展运算符其实很简单,只要记住一句话就可以: 对象中的扩展运算符(...)用于取出参数对象中的所有可遍历属性,拷贝到当前对象之中 let bar = { a: 1, b: 2 ...

  2. ES集群操作原理

    路由 当你索引一个文档,它被存储在单独一个主分片上.Elasticsearch 是如何知道文档属于哪个分片的呢?当你创建一个新文档,它是如何知道是应该存储在分片 1 还是分片 2 上的呢? 进程不能是 ...

  3. Java 大小端转换(基于ByteBuffer)

    大小端的基础知识: 小端( little-endian):低位字节在前,高位字节在后.大端( Big-Endian),则反之.具体而言,就是为了说清楚,CPU架构1 字(word)中byte的存储顺序 ...

  4. P1548 棋盘问题

    题目描述 设有一个N \times MN×M方格的棋盘(1≤N≤100,1≤M≤100)(1≤N≤100,1≤M≤100) 求出该棋盘中包含有多少个正方形.多少个长方形(不包括正方形). 例如:当 N ...

  5. 一张图讲解单机FastDFS图片服务器安装步骤(修订版)

    前面已经讲 一张图秒懂微服务的网络架构,通过此文章可以了解FastDFS组件中单机安装流程. 单机版架构图 以下为单机FastDFS安装步骤 一.环境准备 CentOS 7.X libfastcomm ...

  6. 高并发编程-CountDownLatch深入解析

    要点解说 CountDownLatch允许一个或者多个线程一直等待,直到一组其它操作执行完成.在使用CountDownLatch时,需要指定一个整数值,此值是线程将要等待的操作数.当某个线程为了要执行 ...

  7. Eclipse 安装 ShellEd 不成功的解决办法

    我是Win7, 64位的操作系统,Eclipse 版本是 32位的eclipse-java-luna-SR1-win32.在安装 ShellEd 时,一直安装不成功,前后出现两种现象: 1. 在按照网 ...

  8. shell 数组作为函数形参

    问题描述: 把字符串tarFile和数组slaves_hostIP传入函数processArray中并输出结果. #!/bin/bash function processArray() { tarFi ...

  9. luogu P2759 奇怪的函数 |二分答案

    题目描述 使得 x^x达到或超过 n 位数字的最小正整数 x 是多少? 输入格式 一个正整数 n 输出格式 使得 x^x达到 n 位数字的最小正整数 x 计算一个数有多少位 log10(x)+1 #i ...

  10. C# 设置、删除、读取Word文档背景——基于Spire.Cloud.Word

    Spire.Cloud.Word.Sdk提供了接口SetBackgroudColor().SetBackgroudImage().DeleteBackground().GetBackgroudColo ...