[GH-ISSUE #234] 🕷 Attaching Files > 2MB fails with "An error occurred saving the uploaded file." #198

Closed
opened 2026-02-25 21:34:24 +03:00 by kerem · 1 comment
Owner

Originally created by @ulfgebhardt on GitHub (Nov 23, 2017).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/234

Hi Jason,

i cannot attach Files bigger than 2MB.

PHP.ini

post_max_size = 8M

Folder is writable rwxrwxrwx 0777 and is filled with files i uploaded which are smaler than 2MB

I cannot figure out whats the Problem. Is it a configuration?

Related File: github.com/jasonmunro/cypht@f63ea6374e/modules/smtp/modules.php (L135)

Request URL:https://mail.CENSORED.de/
Request Method:POST
Status Code:200 OK
Remote Address:CENSORED:443
Referrer Policy:no-referrer-when-downgrade
Response Headers
view source
Cache-Control:no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection:Keep-Alive
Content-Encoding:gzip
Content-Length:124
Content-Security-Policy:default-src 'none'; script-src 'self' 'unsafe-inline'; connect-src 'self'; font-src 'self'; img-src 'self' data:; style-src 'self' 'unsafe-inline';
Content-Type:application/json
Date:Thu, 23 Nov 2017 15:25:43 GMT
Expires:Wed, 23 Nov 2016 15:25:45 GMT
Keep-Alive:timeout=5, max=100
Pragma:no-cache
Server:Apache
Set-Cookie:hm_session=CENSORED; path=/; domain=mail.CENSORED.de; secure; HttpOnly
Strict-Transport-Security:max-age=31536000
Vary:Accept-Encoding
X-Content-Type-Options:nosniff
X-Frame-Options:SAMEORIGIN
X-XSS-Protection:1; mode=block
Request Headers
view source
Accept:*/*
Accept-Encoding:gzip, deflate, br
Accept-Language:de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7
Cache-Control:no-cache
Connection:keep-alive
Content-Length:2212010
Content-Type:multipart/form-data; boundary=----WebKitFormBoundaryDRMXBl9qBSe34thy
Cookie:_ga=CENSORED; hm_id=CENSORED; hm_session=CENSORED
DNT:1
Host:mail.CENSORED.de
Origin:https://mail.CENSORED.de
Pragma:no-cache
Referer:https://mail.CENSORED.de/?page=compose
User-Agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.59 Safari/537.36
X-Requested-With:xmlhttprequest
Request Payload
------WebKitFormBoundaryDRMCENSORED
Content-Disposition: form-data; name="upload_file"; filename="DEMOCRACY_X_Pitch_v4_klein.pdf"
Content-Type: application/pdf


------WebKitFormBoundaryDRMCENSORED
Content-Disposition: form-data; name="hm_ajax_hook"

ajax_smtp_attach_file
------WebKitFormBoundaryDRMCENSORED
Content-Disposition: form-data; name="hm_page_key"

32ddd217b98bCENSOREDf44f9fadd77acdCENSORED6dcc891b30089cc3b69
------WebKitFormBoundaryDRMXBl9qBSe34thy
Content-Disposition: form-data; name="draft_id"

1
------WebKitFormBoundaryDRMCENSORED--
{date: "16:25:45", router_login_state: true,…}
date: "16:25:45"
router_login_state: true
router_user_msgs: {0: "ERRAn error occurred saving the uploaded file."}

Grüße Ulf

<3

Originally created by @ulfgebhardt on GitHub (Nov 23, 2017). Original GitHub issue: https://github.com/cypht-org/cypht/issues/234 Hi Jason, i cannot attach Files bigger than 2MB. PHP.ini > post_max_size = 8M Folder is writable rwxrwxrwx 0777 and is filled with files i uploaded which are smaler than 2MB I cannot figure out whats the Problem. Is it a configuration? Related File: https://github.com/jasonmunro/cypht/blob/f63ea6374e3d44c10f7d2654600a3bbf99c7c779/modules/smtp/modules.php#L135 ``` Request URL:https://mail.CENSORED.de/ Request Method:POST Status Code:200 OK Remote Address:CENSORED:443 Referrer Policy:no-referrer-when-downgrade Response Headers view source Cache-Control:no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Connection:Keep-Alive Content-Encoding:gzip Content-Length:124 Content-Security-Policy:default-src 'none'; script-src 'self' 'unsafe-inline'; connect-src 'self'; font-src 'self'; img-src 'self' data:; style-src 'self' 'unsafe-inline'; Content-Type:application/json Date:Thu, 23 Nov 2017 15:25:43 GMT Expires:Wed, 23 Nov 2016 15:25:45 GMT Keep-Alive:timeout=5, max=100 Pragma:no-cache Server:Apache Set-Cookie:hm_session=CENSORED; path=/; domain=mail.CENSORED.de; secure; HttpOnly Strict-Transport-Security:max-age=31536000 Vary:Accept-Encoding X-Content-Type-Options:nosniff X-Frame-Options:SAMEORIGIN X-XSS-Protection:1; mode=block Request Headers view source Accept:*/* Accept-Encoding:gzip, deflate, br Accept-Language:de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7 Cache-Control:no-cache Connection:keep-alive Content-Length:2212010 Content-Type:multipart/form-data; boundary=----WebKitFormBoundaryDRMXBl9qBSe34thy Cookie:_ga=CENSORED; hm_id=CENSORED; hm_session=CENSORED DNT:1 Host:mail.CENSORED.de Origin:https://mail.CENSORED.de Pragma:no-cache Referer:https://mail.CENSORED.de/?page=compose User-Agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.59 Safari/537.36 X-Requested-With:xmlhttprequest Request Payload ------WebKitFormBoundaryDRMCENSORED Content-Disposition: form-data; name="upload_file"; filename="DEMOCRACY_X_Pitch_v4_klein.pdf" Content-Type: application/pdf ------WebKitFormBoundaryDRMCENSORED Content-Disposition: form-data; name="hm_ajax_hook" ajax_smtp_attach_file ------WebKitFormBoundaryDRMCENSORED Content-Disposition: form-data; name="hm_page_key" 32ddd217b98bCENSOREDf44f9fadd77acdCENSORED6dcc891b30089cc3b69 ------WebKitFormBoundaryDRMXBl9qBSe34thy Content-Disposition: form-data; name="draft_id" 1 ------WebKitFormBoundaryDRMCENSORED-- ``` ``` {date: "16:25:45", router_login_state: true,…} date: "16:25:45" router_login_state: true router_user_msgs: {0: "ERRAn error occurred saving the uploaded file."} ``` Grüße Ulf <3
kerem closed this issue 2026-02-25 21:34:24 +03:00
Author
Owner

@ulfgebhardt commented on GitHub (Nov 23, 2017):

Problem was a setting in the PHP.ini

upload_max_filesize = 2M

changing it to

upload_max_filesize = 8M

fixed the Problem!

<!-- gh-comment-id:346650922 --> @ulfgebhardt commented on GitHub (Nov 23, 2017): Problem was a setting in the PHP.ini > upload_max_filesize = 2M changing it to > upload_max_filesize = 8M fixed the Problem!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cypht#198
No description provided.