VVT
Active Member
Hi peeps,
Seeing some forum posts regarding issues in sending attachments via APIs. Just wanted to give you ppl a simple and easy workaround on the same. You can actually upload the attachments to ckeditor filemanager and then put a direct download link on the email. You would upload the files just like the images. But, remember that only image types are currently allowed by default.
You can edit apps/common/extensions/ckeditor/controllers/Ext_ckeditorController.php and update the " uploadAllow" value to something like this to allow additional extensions ->
Now, you should be able to upload files with the specified extensions.
Advantages :
1. You can enhance the speed of delivery since less data is transferred.
2. Reduce bandwidth.
3. Less computing power required.
4. Emails will be lighter and reduce the "spamminess" of your emails.
5. Cost reduction if using 3rd party ESPs.
6. You can track the downloads.
Think, a 5MB attachment sent to 10K subscribers will result in 50GB of storage space at the recipient ISP - something that no ISP will be happy about.
Also, the changes you make to the above file will be overridden on the next MW update.
@twisted1919 Can you allow a custom file to specify additional extensions so that changes will persist even after MW update ?
Seeing some forum posts regarding issues in sending attachments via APIs. Just wanted to give you ppl a simple and easy workaround on the same. You can actually upload the attachments to ckeditor filemanager and then put a direct download link on the email. You would upload the files just like the images. But, remember that only image types are currently allowed by default.
You can edit apps/common/extensions/ckeditor/controllers/Ext_ckeditorController.php and update the " uploadAllow" value to something like this to allow additional extensions ->
PHP:
$uploadAllow = array('image','application/pdf','application/msword','application/vnd.ms-word','application/vnd.ms-excel','application/vnd.ms-powerpoint','application/vnd.oasis.opendocument.text','application/vnd.oasis.opendocument.presentation','application/vnd.oasis.opendocument.spreadsheet','application/vnd.openxmlformats-officedocument.wordprocessingml.document','application/vnd.openxmlformats-officedocument.spreadsheetml.sheet','application/vnd.openxmlformats-officedocument.presentationml.presentation','application/x-bzip','application/x-compressed-tar','application/x-gzip','application/x-rar','application/x-tar','application/zip','text/plain','text/calendar','text/directory');
Now, you should be able to upload files with the specified extensions.
Advantages :
1. You can enhance the speed of delivery since less data is transferred.
2. Reduce bandwidth.
3. Less computing power required.
4. Emails will be lighter and reduce the "spamminess" of your emails.
5. Cost reduction if using 3rd party ESPs.
6. You can track the downloads.
Think, a 5MB attachment sent to 10K subscribers will result in 50GB of storage space at the recipient ISP - something that no ISP will be happy about.
Also, the changes you make to the above file will be overridden on the next MW update.
@twisted1919 Can you allow a custom file to specify additional extensions so that changes will persist even after MW update ?