|Title||»||Exported Notebooks include embedded attachments for all previous versions of each entry|
1. Create a Notebook
2. Embed several large images into the entry (on OS X go to an image in finder, CMD + C the image, then go to the entry and hit CMD + V). These files must collectively be greater than 50MB
3. Wait at least 5 minutes, then remove the images from the entry
4. Submit the notebook
5. Approve the notebook
Expected Results: The notebook is approved
Actual Results: Notebook approval fails when generating the signed snapshot, and the same type of error as previously reported is rendered.
This case is especially confounding because to the user there are no attachments. What we are doing is exporting all embedded images associated with each entry's wiki, even if they're not associated with the most recent version of an entry. Instead, what we should be doing is only exporting embedded attachments associated with the most recent wiki version of each entry.
We'll want to do two things:
1. Add a method to RemirroDocumentProcessor, getEmbeddedAttachmentFiles, that gets all AttachmentFiles for a given entry
2. Add a new method to NoteobokWriter called writeEmbeddedAttachments and replace the call to writeAttachments that passes "inlineAttachments" as true. This method will use the getEmbeddedAttachmentFiles from RemirrorDocumentProcessor to get the list of AttachmentFiles, then it will write them like we do in the current writeAttachments method.