문제

I'm trying to use django-ajax-uploader in my website, which works just fine in LAN, but while I upload my file through internet, it only uploads a file of no more than 2MB, any file bigger than 2MB will fail.
I changed the default BUFFER_SIZE to 64MB but still did not work. And I have tested Chrome , Safari and Firefox, all failed.

Have any of you ever met this problem before? Thx :)

ps: I've seen this tip , but I'm quite sure it's a different case.

도움이 되었습니까?

해결책

What frontend server do you use (Apache, nginx)? You need to check it settings.

EDIT: If you're using nginx you need something like this:

server {
        listen   80;
        server_name example.com;

        client_max_body_size    64m;
}

For apache something like so:

upload_max_filesize = 64M
post_max_size = 64M

You could check that the problem is with the frontend server by:

  1. run ./manage.py runserver 0.0.0.0:8000 on production server - this runs 'developer' server on port 8000 and allows to connect from your computer
  2. go to yourdoamin.com:8000 and try to upload a large file. It should work fine.
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top