{"action":"created","issue":{"url":"https://api.github.com/repos/andris9/Nodemailer/issues/452","labels_url":"https://api.github.com/repos/andris9/Nodemailer/issues/452/labels{/name}","comments_url":"https://api.github.com/repos/andris9/Nodemailer/issues/452/comments","events_url":"https://api.github.com/repos/andris9/Nodemailer/issues/452/events","html_url":"https://github.com/andris9/Nodemailer/issues/452","id":91659364,"number":452,"title":"Image attachment coming through with no data","user":{"login":"mycompassspins","id":6962349,"avatar_url":"https://avatars.githubusercontent.com/u/6962349?v=3","gravatar_id":"","url":"https://api.github.com/users/mycompassspins","html_url":"https://github.com/mycompassspins","followers_url":"https://api.github.com/users/mycompassspins/followers","following_url":"https://api.github.com/users/mycompassspins/following{/other_user}","gists_url":"https://api.github.com/users/mycompassspins/gists{/gist_id}","starred_url":"https://api.github.com/users/mycompassspins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mycompassspins/subscriptions","organizations_url":"https://api.github.com/users/mycompassspins/orgs","repos_url":"https://api.github.com/users/mycompassspins/repos","events_url":"https://api.github.com/users/mycompassspins/events{/privacy}","received_events_url":"https://api.github.com/users/mycompassspins/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-06-29T00:36:36Z","updated_at":"2015-06-29T15:22:04Z","closed_at":"2015-06-29T01:32:13Z","body":"Hey there,\r\n\r\nDespite all the hair I've pulled outta my head over the last few hours, I love nodemailer :) I'm trying to send an image attachment and it's coming through, but with no data. 0kb in size. That's using this code:\r\n\r\n    var path = require('path');\r\n    var uploadDir = path.dirname(require.main.filename); \r\n    // This actually produces a filepath that starts at my /Applications dir on my Mac, but ends in the right spot.\r\n\r\n    var img = require(\"fs\").readFileSync(uploadDir + '/uploads/' + params.newFileName);\r\n    // file was upload was handled on the server by multer and renamed to something like this: fc5c5921bd0892f114cd7b6f0d39d9a3.gif\r\n\r\n    attachments: [{\r\n        filename: params.newFileName,\r\n        filePath: img\r\n    }]\r\n\r\nI've tried about a hundred variations on the theme based on my research online, and either I get no attachment at all, the result outlined above, or a generic attachment-1.bin. I would sure love some guidance :)"},"comment":{"url":"https://api.github.com/repos/andris9/Nodemailer/issues/comments/116730042","html_url":"https://github.com/andris9/Nodemailer/issues/452#issuecomment-116730042","issue_url":"https://api.github.com/repos/andris9/Nodemailer/issues/452","id":116730042,"user":{"login":"sschwartzman","id":3536684,"avatar_url":"https://avatars.githubusercontent.com/u/3536684?v=3","gravatar_id":"","url":"https://api.github.com/users/sschwartzman","html_url":"https://github.com/sschwartzman","followers_url":"https://api.github.com/users/sschwartzman/followers","following_url":"https://api.github.com/users/sschwartzman/following{/other_user}","gists_url":"https://api.github.com/users/sschwartzman/gists{/gist_id}","starred_url":"https://api.github.com/users/sschwartzman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sschwartzman/subscriptions","organizations_url":"https://api.github.com/users/sschwartzman/orgs","repos_url":"https://api.github.com/users/sschwartzman/repos","events_url":"https://api.github.com/users/sschwartzman/events{/privacy}","received_events_url":"https://api.github.com/users/sschwartzman/received_events","type":"User","site_admin":false},"created_at":"2015-06-29T15:22:04Z","updated_at":"2015-06-29T15:22:04Z","body":"I seem to be running into the same issue. I've tried various ways to attach a .png file and all come back with a blank file, regardless if im trying to embed it inline to the html or not."}}