[halo-dev/halo]上传文件卡100%

2024-04-23 500 views
8
What is version of Halo has the issue?

2.0

What database are you using?

MySQL 8.x

What is your deployment method?

Docker

Your site address.

https://142536.vip/

What happened?

上传附件卡100% image

Relevant log output

No response

Additional information

No response

回答

7

大文件上传后需要稍微等等才能完成。

3

image 服务器没限制

9

#PROXY-START/

location ^~ /
{
    proxy_pass http://127.0.0.1:18099;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header REMOTE-HOST $remote_addr;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $connection_upgrade;
    # proxy_hide_header Upgrade;

    add_header X-Cache $upstream_cache_status;

    #Set Nginx Cache

    set $static_filen1hUPzmb 0;
    if ( $uri ~* "\.(gif|png|jpg|css|js|woff|woff2)$" )
    {
        set $static_filen1hUPzmb 1;
        expires 12h;
        }
    if ( $static_filen1hUPzmb = 0 )
    {
    add_header Cache-Control no-cache;
    }
}

#PROXY-END/
7

image 这个是不是同一个问题?

4

如果没有配置 max request body,则默认是 1MB。也就是说默认情况下,Nginx 只允许 1MB 大小的文件上传。

0

image 加上这句 附件能上传成功 但还是卡在100%

image

3

我尝试了上传 1.2 G 大小的文件,是可以上传成功的,但是确实会在 100% 停留一段时间(我这里大概 10s)。这可能是 100% 代表着已经发送到服务器,但服务器接收和处理还需要一定的时间,你可以等待一会儿试试。

image
3

如果没有后续动态,我将关闭此 issue,可以随时 reopen 或者新建 issue。

/close

4

@ruibaby: Closing this issue.

In response to [this](https://github.com/halo-dev/halo/issues/3812#issuecomment-1541420105): >如果没有后续动态,我将关闭此 issue,可以随时 reopen 或者新建 issue。 > >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.