// Two files already picked, standing in for what a reader would choose.
const composer = document.querySelector('aparte-composer');
const notes = new File(['# Launch notes'], 'launch-notes.md', { type: 'text/markdown' });
const canvas = Object.assign(document.createElement('canvas'), { width: 120, height: 80 });
const paint = canvas.getContext('2d');
paint.fillStyle = '#b07d33';
paint.fillRect(0, 0, 120, 80);
canvas.toBlob((blob) => composer.addAttachments([notes, new File([blob], 'cover.png', { type: 'image/png' })]));