How do attachments work?

Jan 18, 2014 at 9:19 PM
Hello Phil
The Windows Kee Pass version, has an integrated text (and also rtf) editor to allow viewing and editing of a txt attachment without having to save it to disk (where it could remain there unencrypted )

For K2A, I read the documentation and searched the discussions but I could not find an explanation on how it works. The only reference to attachments is the home page "support for editing entries including additional string fields, file attachments, tags etc." and this thread where you say you were developing a new way of attaching files.

So Phil can you please explain a little more how it works?
What I'm looking for is to be able to edit a text attachment without having to save it and import it again.
I am trying it with my N7 (kitkat 4..4.2) and when I open an attachment I have 2 options:

a- Save to SD card : This is very clear what it does, but not what I am looking for.

b- Save to cache and open : I can open the attachment from the cache but , I can´t seem to be able to edit it. It opens in a text editor (I can select wich one) , but apparently in read-only form. I will not let me edit the file.
I was hoping to be able to edit the file, go back (or save it) and automatically be updated in K2A data base. And this should be done without leaving any clear text copy on the filesystem.

Alternatively, if I select to edit the entry ("pencil" button at the bottom of the screen) , the entry goes into edit mode, but for the attachments the only thing that you can do is delete them. It won´t open in the viewer / editor at all.

So... is there really a way to edit an attachment with an external editor?

(In any case, it would be awesome if K2A could have an internal text editor (just plain text editor would be enough) so that you could edit a text attachment directly in memory and without ever saving it to cache)

Jan 20, 2014 at 3:59 AM
I have only considered the use case of "using an attachment" (like what you do with an email attachment - you just view it, don't edit it). Here, saving to the app's private cache directory is already quite safe. Of course if would be even safer to integrate viewers, but if I start to add 1 viewer for text, the next requests will pop up for images, PDF, docx, ... and that's not what I am going to do...

For your request regarding editing text: Couldn't you simply use the Notes field or a custom string field?
Jan 20, 2014 at 9:08 AM
Thanks for your reply.

Ok it seems clear now. I got misled by the phrase in the description "support for editing entries including additional string fields, file attachments, tags etc." and I was scratching my head to figure out how to do this. Now it's clear.
I do use the Notes field as you suggest. It´s just that a couple of my notes are a bit long.

Regarding implementing a native viewer ...I completely understand. If you start with a plain text one, who knows what's gonna be requested next. :-)
You have done a wonderful job already, the app is awesome!

Thanks for keeping it free as in freedom, and also as in beer. Speaking of beer, I´ll buy you one.