Running Osticket v1.17v2 on IIS. Office 365 email
We are getting file upload undefined 500 error when trying to attach file to ticket attachments are being received with new tickets just failing internally to upload.
Add the File Type (eg. .zip) to the Additional File Type Filters setting to the field and retest. For Ticket Details filed this is Admin Panel > Settings > Tickets > Ticket Attachment Settings > Config.
Same Problem here after updating from 1.17.1 to 1.17.3. I can attach a txt or a jpg file, but not for example a zip.
Receiving a zip from a customer works.
i have three types in this field ".fil, .zip, .pfc", but the error occurs when i insert a zip file.
It happens after update to 17.3 (from 17.1).
Interesting, I'm running v1.17.3 and able to upload ZIP just fine. Are you missing any PHP extensions from Admin Panel > Dashboard > Information? Can you upload an example ZIP to this forum for us to test?
Missing PHP Extensions: APCu and Zend OPcache.
Take a look:
Attached a sample Zip
We do not go to 3rd party sites to view things, sorry. You can upload any screenshots directly to this forum.
I was able to upload this example just fine. How about right click the page, click Inspect, click Network, check the box to Preserve Logs, upload the file, click the request in the Network tab, click Response, and see what the response says.
It's an 8,6Mbyte MP4 file and i can't upload it here.
Yea, you can take screenshots and upload those instead. Or make a GIF and upload that.
So here they are:
jothie The Response tab
Attached the response tab:
So apparently the file is invalid in your case somehow but it wasn't for me. Apparently the given MIME TYPE doesn't match the MIME Type returned from FileObject::mime_type():
You're right, i have commented out this lines:
// Make sure mime type is valid
// $file['type']) !== 0)
// return false;
and it works.
It have checked the old source 1.17.1 -> This lines seems to be new in 1.17.2 or 1.17.3.
Many thanks for your help.
Yes, it's a security patch. But it's very strange that I'm able to upload this and you are not. I wonder what the difference is here.. 🤔
Can you please create a PHP file in your osTicket directory, paste the following content, visit the file in the browser, and tell me what the page displays?
var_dump('finfo_open exists: ', function_exists('finfo_open'));
string(19) "finfo_open exists: " bool(true)
That would be the only difference but you have that method as well so I'm not sure why you can't but I can without making any changes...so odd. Can you download the example you uploaded to the Forum and retest with the downloaded ZIP? I wonder if uploading it here fixed the MIME Type.
Downloaded and tested - no change.
But i have tested it on a mac - there it works.
But on every W11 PC i tested -> failed.
We're having the same issue. Had to comment out this as a temp fix:
jothie , we had the same issue with saving emails on Mac vs windows. The difference was that Mac uses .eml files which work ok, Windows uses .msg, which does not work.
I'm not sure if you're having the same problem.