Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDF file fails to be UPLOADED #203

Open
MohamedAmineDHIAB opened this issue May 21, 2024 · 1 comment
Open

PDF file fails to be UPLOADED #203

MohamedAmineDHIAB opened this issue May 21, 2024 · 1 comment

Comments

@MohamedAmineDHIAB
Copy link

MohamedAmineDHIAB commented May 21, 2024

Dear WebWhiz Team,

When trying to create a chatbot and uploading
This PDF to use as a context for the chatbot, the upload fails with the following screen pop-up:

Screenshot from 2024-05-21 10-18-41

By looking at the console logs, it seems like the request size is too large:

image

However, I wouldn't consider 32 pages or 1.8 Mb (the PDF file used for tests) as large 🤔 . Some LLMs have very large context window size that exceeds 100s of pages.

I am looking forward to a solution for this issue and thanking you in advance! 😊

@MohamedAmineDHIAB MohamedAmineDHIAB changed the title 32 pages PDF fails to be UPLOADED PDF file fails to be UPLOADED May 21, 2024
@mpvasilis
Copy link

mpvasilis commented Jul 31, 2024

Hello,

To resolve this issue, you need to update the Nginx configuration for the frontend. You should modify the frontend/nginx.conf file by adding the client_max_body_size 50M; directive within the location ~ ^/api(/?)(.*) block.

  1. Open the frontend/nginx.conf file in your preferred text editor.
  2. Locate the location ~ ^/api(/?)(.*) block.
  3. Add the client_max_body_size 50M; directive within this block.

The updated configuration should look like this:

upstream web {
  server web:3000;
}

server {
  listen 80;

  location ~ ^/api(/?)(.*) {
    proxy_pass http://web/$2$is_args$args;
    client_max_body_size 50M;
  }

  location / {
    root /usr/share/nginx/html/;
    include /etc/nginx/mime.types;
    try_files $uri $uri/ /index.html;
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants