Sean Reilly on 27 Oct, 2016 08:37 AM
Whoops, sorry about the documentation dropping off there. The
method description should have continued with the following
code: InputStream attachmentIn =
The reason you have to go through the local storage rather than
read the file directly is because the raw files are encrypted along
with the rest of the data. So the openFileForReading(String path)
method is needed to access the right file as well as decrypt it. In
our attachments panel we read the encrypted file into a temporarily
decrypted file in order to open it with the local storage's method
readFile(String path, OutputStream tempFileOut).
Sean Reilly on 07 Jul, 2017 07:09 PM
Ah yes! The readFromFile method was renamed to readFile, but should have the same parameters. Also, I just recently created a python script that will export all attachments from MD2017. I've attached that script here in case it might also help.
Great! That worked! Will you update the online API documentation? Is there any way I could have figured that out? Is there a way of listing the methods of a class within a python script? If I could do that I would probably have been able to figure it out myself.