Trusted direct messaging - sending jpg files

How can I allow jpeg files to be sent through trusted direct messaging? I can receive jpeg files (they are in the white list), but I cannot attach them to outgoing messages. It only allows pdf and xml files.
I looked through trusted-messages-ajax.php and added ‘image/jpeg’ => 'jpg to

$mimeTypeMappings = [
‘application/pdf’ => ‘pdf’
,‘text/xml’ => ‘xml’
,‘application/xml’ => ‘xml’

However, it did not work. It said there was an error and to check the system log (which I could not locate for some reason. Any suggestions?


Well, I answered my own question, but maybe someone else may be interested, too. Yes, it is possible to push any type of file through EmrDirect (direct messaging). I had to make a few modifications to 2 files (main/messages/trusted-messages-ajax.php and library/ and image files (I added image/jpeg, image/png, and image/bmp) can be attached to direct messages now.

While I was working on that, I was also able to modify the code to allow for multiple attachments (up to 6), so that I can now send out direct messages with up to 6 attachments of most mime types and to change the To field (direct email address) to a drop-down list of providers with available direct email addresses. These modifications, however, were a bit harder and required multiple file modifications (interface/main/messages/trusted-messages.php, ccr/transmitCCD.php, interface/main/messages/trusted-messages-ajax.php, interface/main/messages/js/trusted-messages.js, interface/main/finder/document_select.php, and src/Services/DocumentService.php). But it is possible…



I am interested in those enhancements to the Direct service. Could you submit a pull request to bring it in to the project?