Attachments in MoneyDance 2015

Doug Stout's Avatar

Doug Stout

25 Apr, 2016 12:58 PM

Is there a way to un-encrypt and open attachments in an extension?

  1. Support Staff 1 Posted by Sean Reilly on 27 Apr, 2016 10:34 AM

    Sean Reilly's Avatar

    Hi Doug,

    Yes, you'll need to access the abstracted local storage to get an unencrypted version of the file:

       AbstractTxn txn = <yourtransaction>;
        for(String attachKey : txn.getAttachmentKeys()) {
          String attachmentPath = txn.getAttachmentTag(attachKey);
          InputStream in = transaction.getBook().getLocalStorage().openFileForReading(attachmentPath);
          // read from the decrypted input stream here, but make sure to close it!
        }
    

    Hope this helps!

    Sean Reilly
    Developer, The Infinite Kind
    http://infinitekind.com

  2. 2 Posted by Doug Stout on 27 Apr, 2016 04:35 PM

    Doug Stout's Avatar

    That worked--Thanks.

  3. Ian L closed this discussion on 28 Apr, 2016 01:01 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac