Jeremy D commited on 2021-09-01 15:36:49
Showing 1 changed files, with 2 additions and 0 deletions.
2 Cases: 1. New ticket with attachment and would be valid. 2. New ticket with invalid data (such as missing department), save, get error for missing dept, add dept and save again. Also add approved = 1 since this makes SMF happy.
... | ... |
@@ -2044,6 +2044,8 @@ function shd_handle_attachments() |
2044 | 2044 |
'tmp_name' => $uplfile['tmp_name'], |
2045 | 2045 |
'size' => $uplfile['size'], |
2046 | 2046 |
'id_folder' => $modSettings['currentAttachmentUploadDir'], |
2047 |
+ 'mime_type' => !empty($uplfile['type']) ? $uplfile['type'] : get_mime_type($uplfile['tmp_name'], true), |
|
2048 |
+ 'approved' => 1, |
|
2047 | 2049 |
); |
2048 | 2050 |
|
2049 | 2051 |
if (createAttachment($attachmentOptions)) |
2050 | 2052 |