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

Adding Attachments #2109

Closed
SecureCPU opened this issue Jul 22, 2022 · 5 comments
Closed

Adding Attachments #2109

SecureCPU opened this issue Jul 22, 2022 · 5 comments

Comments

@SecureCPU
Copy link

I'm having trouble attaching documents of any size to notes inside conversations or to an email I'm trying to send out to a client.

I have FreeScout installed on a virtual Linux server.

I have checked the web-server.log file under App Logs and found the following error message:

2022/07/22 05:31:37 [error] 744#744: *267174 client intended to send too large body: 1734635 bytes, client: 192.168.200.4, server: freescout.example.com, request: "POST /conversation/upload HTTP/1.1", host: "freescout.example.com", referrer: "https://freescout.example.com/conversation/1211?folder_id=7"

The file isn't big. I know emails generally have a limit of 20M. This file was 1.65MB

Would anyone be able to help me resolve this issue or help me increase the upload size limit for attachments?

@ilyakonovalenko
Copy link
Contributor

You probably have such limitation in nginx configuration.
Try to increase client_max_body_size param.

@SecureCPU
Copy link
Author

You probably have such limitation in nginx configuration.
Try to increase client_max_body_size param.

How would I be able to do this?
Sorry, I'm kinda still new to all this.

@ilyakonovalenko
Copy link
Contributor

How would I be able to do this?

You have to edit nginx configuration. Please contact your system administrator or hosting provider if you are not familiar with Linux management.

@SecureCPU
Copy link
Author

Thank you for the Info! I Found the fix.

I have a Virtual Linux Server. So to increase the size, I followed the directions in this link:

https://linuxhint.com/what-is-client-max-body-size-nginx/

The nginx.cong didn't have the client_max_body_size
So I added it and set the limit to 100MB.
Then restarted Nginx and it worked like a charm.

Thank you!!!

@ar-ml
Copy link

ar-ml commented Feb 7, 2023

Just for anyone who might be reading this in the future:
I had a similar issue with uploading files to the freescout backend. Also attachments where sometimes not accepted when uploading them to the freescout frontend form (End-User Portal).

My solution for my Server:

  1. Install filezilla and connect to your server using sftp:// and your SSH credentials

  2. go to /etc/nginx and download nginx.conf

  3. In line 27 I added: client_max_body_size 20M;

  4. uploaded the modified nginx.conf via filezilla and overwrite the old file.

  5. Then I fetched the file php.ini from /etc/php/7.4/fpm

  6. I changed the following values:
    max_execution_time 120
    memory_limit 128M
    post_max_size 32M
    upload_max_filesize 25M

  7. uploaded php.ini again and overwrite the old version

  8. Connected to my Server via SSH using PuTTY

  9. Restarted the whole server using the command systemctl reboot

-> After that I was able to upload attachments to freescout with a maximum files size of 25MB. :-)

Be aware that I am not 100% sure if the set values are appropriate - your setup might need different values and your file paths might be different.

Feedback about my procedure and the chosen values is appreciated. Thx!

//
Bonus tip:
To check, if your php configuration took effect, you can temporarily upload a phpinfo.php to /var/www/html/public and open it in your browser. See instructions here. Don't forget to delete the phpinfo.php afterwards.

Alternatively, you can check some php-values on the freescout system status page under
yourfreescoutdomain.com/system/status

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

4 participants