We currently support attaching the following file types:
- CSV
- XLSX
- DOCX
- TXT
- PNG
- JPG
We support file attachments via Data URLs and typically recommend a library to help facilitate the process of creating these URLs.
from datauri import DataURI
str(DataURI.from_file('test.pdf'))
# => data:application/pdf;base64,JVBERi0xLjMNJeLjz9 (truncated)
const Datauri = require('datauri/sync');
Datauri('test.pdf').content;
// => data:application/pdf;base64,JVBERi0xLjMNJ (truncated)