@upyo/mailgun 0.3.0-dev.33 → 0.3.0-dev.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -211,7 +211,9 @@ function formatAddress(address) {
211
211
  * @param attachment - The attachment to append
212
212
  */
213
213
  async function appendAttachment(formData, attachment) {
214
- const blob = new Blob([await attachment.content], { type: attachment.contentType });
214
+ const content = await attachment.content;
215
+ const buffer = content.buffer instanceof ArrayBuffer ? content.buffer.slice(content.byteOffset, content.byteOffset + content.byteLength) : content.slice();
216
+ const blob = new Blob([buffer], { type: attachment.contentType });
215
217
  if (attachment.contentId) formData.append("inline", blob, attachment.filename);
216
218
  else formData.append("attachment", blob, attachment.filename);
217
219
  }
package/dist/index.js CHANGED
@@ -210,7 +210,9 @@ function formatAddress(address) {
210
210
  * @param attachment - The attachment to append
211
211
  */
212
212
  async function appendAttachment(formData, attachment) {
213
- const blob = new Blob([await attachment.content], { type: attachment.contentType });
213
+ const content = await attachment.content;
214
+ const buffer = content.buffer instanceof ArrayBuffer ? content.buffer.slice(content.byteOffset, content.byteOffset + content.byteLength) : content.slice();
215
+ const blob = new Blob([buffer], { type: attachment.contentType });
214
216
  if (attachment.contentId) formData.append("inline", blob, attachment.filename);
215
217
  else formData.append("attachment", blob, attachment.filename);
216
218
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@upyo/mailgun",
3
- "version": "0.3.0-dev.33+fd596d86",
3
+ "version": "0.3.0-dev.36+e7618f03",
4
4
  "description": "Mailgun transport for Upyo email library",
5
5
  "keywords": [
6
6
  "email",
@@ -53,7 +53,7 @@
53
53
  },
54
54
  "sideEffects": false,
55
55
  "peerDependencies": {
56
- "@upyo/core": "0.3.0-dev.33+fd596d86"
56
+ "@upyo/core": "0.3.0-dev.36+e7618f03"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@dotenvx/dotenvx": "^1.47.3",