-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow linking pictures in notes #92
Comments
This would be a nice feature and it is occasionally requested. It is well possible that support of attachements will be implemented in future, but let me explain why it is not so easy to do. It's a bit technical but nevertheless it should give some insight into the problems, a simple app like SilentNotes has to face. Centralized apps which store the notes on their own servers, with server side code under their own control, can easily handle transactions. If a synchronization fails, a database can rollback all changes (notes and attachements) and get back to a valid state. If several devices sync at the same time, the transaction guarantees a serialization of the syncs. SilentNotes on the other hand uses self hosting with WebDav, FTP or cloud services like OneDrive. There is no need to install code on server side, the server is not controlled by the app, and the protocols do not offer transaction handling. This makes it difficult to guarantee a valid state without loss of information. Another problem is the clean-up of attachements when not used anymore. SilentNotes can only find out whether attachements are abandoned, as long as the safe is open and the content is decrypted (not at the moment of syncing). If you delete an encrypted note, SilentNotes cannot easily detect whether there is an attachement to remove, and other devices could still refer to it. For notes this is solved by maintaining a list of ids of all deleted notes. That said, it is not impossible to implement, but I hope you understand why it needs some time. |
What about using data-url ? That way, there's no separate file to save and as such, no complex synchronization handling. It's using 33% more size for base64 encoding, but I don't think it's an issue. |
Yes including the pictures inside the repository (which is zipped before the encryption/sync anyway) would clearly solve the synchronisation problem, but it doesn't scale. With a few pictures you will quickly get up to 10MB, which can become a problem if you have to download it every time you startup the app. Even more of a problem is the upload, in case there are modifications on the notes, especially with a mobile data connection it would get slower and slower. For me this is not an option, it is simply not necessary to up-/download the attachements every time, especially since they are immutable and never change. On the other hand, a proper handling must be possible and I will head for it. |
What if you cache the photos on the phone, and only update them if they change. Would that be feasable? Is there any estimation for tjis feature? The app has great potential, but it's missing this important feature. |
SilentNotes always has a local copy of the notes/attachements, this is how the app works (one can work offline without internet connection). So this caching of encrypted attachements would be done in any case, the crucial point is whether a transaction has to handle multiple or a single file, cached attachements means that multiple files are involved. At the moment I'm working hard at replacing the editor with ProseMirror , it allows for more features and it seems to run more stable. This is much of work and has priority at the moment, thus I cannot promise any date yet. |
I'm currently extracting the synchronization into a background service, which can stay alive a bit longer than the app itself on Android. This is a precondition of a reliable synchronization of multiple files. https://github.com/martinstoeckli/SilentNotes/tree/feature/sync-background-service2 |
It would be very useful if the application allowed importing a photo from the current gallery to insert in note (and even better, a small audio clip for recorded voice note)
The text was updated successfully, but these errors were encountered: