-
-
Notifications
You must be signed in to change notification settings - Fork 257
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
Papermerge-CLI Uploading Error #538
Comments
Hello, Thanks |
My guess is that the issue may be with the configurations in this file: https://github.com/papermerge/docker/blob/master/papermerge/nginx.conf (according to this article: https://www.cyberciti.biz/faq/linux-unix-bsd-nginx-413-request-entity-too-large/) I mean, in nginx config should be added a line like: client_max_body_size 100M; where "100M" is the max document size you can upload. |
Hi Eugen, I made the change directly in the running docker image and I confirm that it's working as expected. Many thanks for your support. |
Hi Guys, I'm struggling to find the nginx config file within the docker.. Can someone give me the container & path I should be looking for? Cheers |
The file to modify within the container is /etc/nginx/nginx.conf |
Hi, When I try to CD to etc. I get "permission denied: unknown" I can only get to bin/app I have checked & I am under root with docker exec |
Well it fixed the web upload, but the papermerge-cli is still reporting the same error. I don't want to upload using web as it's a long process with the amount of files I have. Hopefully fixed in the next pull :0 |
Oops, I forgot to mention that you should restart the nginx service too ... |
I released 2.1.9 which contains above mentioned fix. The max size for uploaded document (max size one document can have) is hardcoded to 100 MB. I also updated "Import Folders/Document" section in the documentation with instructions about Please don't forget to close the ticket in case you think the issue was resolved. |
Hi, @ciur : For me it's ok but I'll let @drtechnofreak the opportunity to close his ticket. |
papermerge-cli import Uploaded/
Importing Uploaded/23435-9-041.pdf
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/papermerge_cli/utils.py", line 62, in inner
return func(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/backoff/_sync.py", line 105, in retry
ret = target(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/papermerge_cli/rest.py", line 150, in upload_document
documents_api_instance.upload_file(
File "/usr/local/lib/python3.10/dist-packages/papermerge_restapi_client/paths/api_documents_document_id_upload_file_name/put.py", line 257, in upload_file
return self._upload_file_oapg(
File "/usr/local/lib/python3.10/dist-packages/papermerge_restapi_client/paths/api_documents_document_id_upload_file_name/put.py", line 235, in _upload_file_oapg
raise exceptions.ApiException(api_response=api_response)
papermerge_restapi_client.exceptions.ApiException: (413)
Reason: Request Entity Too Large
HTTP response headers: HTTPHeaderDict({'Server': 'nginx/1.18.0', 'Date': 'Sat, 18 Mar 2023 21:05:57 GMT', 'Content-Type': 'text/html', 'Content-Length': '183', 'Connection': 'close'})
HTTP response body: b'\r\n<title>413 Request Entity Too Large</title>\r\n\r\n
413 Request Entity Too Large
\r\nnginx/1.18.0\r\n\r\n\r\n'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/papermerge_cli/utils.py", line 62, in inner
return func(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/papermerge_cli/rest.py", line 326, in perform_import
upload_document(
File "/usr/local/lib/python3.10/dist-packages/papermerge_cli/utils.py", line 72, in inner
raise ApiException from e
papermerge_restapi_client.exceptions.ApiException: (None)
Reason: None
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/bin/papermerge-cli", line 8, in
sys.exit(cli())
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/papermerge_cli/main.py", line 107, in _import
perform_import(
File "/usr/local/lib/python3.10/dist-packages/papermerge_cli/utils.py", line 39, in inner
return func(**kwargs)
File "/usr/local/lib/python3.10/dist-packages/papermerge_cli/utils.py", line 54, in inner
return func(**kwargs)
File "/usr/local/lib/python3.10/dist-packages/papermerge_cli/utils.py", line 72, in inner
raise ApiException from e
papermerge_restapi_client.exceptions.ApiException: (None)
Reason: None
The text was updated successfully, but these errors were encountered: