Beaver-Notes / Beaver-pocket

All the amazing features of Beaver Notes packed into the perfect note-taking app for you on the go.
MIT License
45 stars 4 forks source link

(S)FTP access #16

Open C-O-D opened 2 months ago

C-O-D commented 2 months ago

Are you planning to add (s)FTP access for synchronization in the near future? I don't want to set up an extra Dropbox or WebDAV account for synchronization with my smartphone, as I would like to stay offline with my data.

Daniele-rolli commented 2 months ago

Thanks for your suggestion! We'll work on adding support for (s)FTP, as well as iCloud, Google Drive, and OneDrive. All of these features will be available either in the release candidate planned for early this fall or in the stable release, which should be available later this fall. Hope this answers your question.

C-O-D commented 2 months ago

Absolutely and I'm glad to hear it - it's just a security thing, what good is it if all my files are stored with me and I need a third party tool to synchronize them. Hence the question: Would it perhaps be possible to create the option of simply importing the data from the internal storage until the other accesses are ready?

Daniele-rolli commented 2 months ago

There is an option to import data from device storage. However, since the app is still in development and no documentation is available yet, the process is a bit tricky. On iOS, you can place the folder you want to import into the export folder and then click 'Import Data' under 'Settings > Sync.' The app is limited to reading within its own folder. On Android, unfortunately, the app folder is not accessible to the user, so we currently have no way to implement import and export there.

C-O-D commented 2 months ago

Very unfortunate as I'm on Android 13 here, although I don't quite understand why this isn't possible as I'm constantly giving other apps access to individual folders, which then works. Anyway, since I think your app is so great, I created a webDAV account yesterday and had to realize that unfortunately that didn't work either. The folder you can see in the screenshot contains the data exported from the desktop app, but the import just won't work. However, when I tap on webdav.login I don't get an error message.

Screenshot_2024-09-08-13-51-00-108_beaver notes pocket

Daniele-rolli commented 2 months ago

I've read the IONOS documentation, and it seems like the path might be incorrect. Try using https://webdav.hidrive.ionos.com/. Let me know if it works. I'll work on improving the login process to report whether the URL is valid.

C-O-D commented 2 months ago

I've really tried all sorts of different paths - the one you suggested produced the following error message: Screenshot_2024-09-08-16-03-56-144_beaver notes pocket

Daniele-rolli commented 2 months ago

This might sound silly, but after changing the path, did you click the login button again to save the credentials? Have you checked if the Beaver-Pocket folder actually exists and contains a folder named Beaver Notes 2024-09-08? By the way, I apologize for any inconvenience. I'll do my best to help.

C-O-D commented 2 months ago

Yes I did, no problems...the logo isn't red.

Daniele-rolli commented 2 months ago

So, does it work now?

C-O-D commented 2 months ago

No it did not but okay, what exactly does the folder hierarchy on the server have to look like? I also have the folders public and Users in the root folder, which I can't change...

Daniele-rolli commented 2 months ago

Normally, the app creates its own folder in the root directory called Beaver Pocket. Inside it, there should be a folder named Beaver Notes YYYY-MM-DD. You can create this folder by exporting it using either Beaver Notes or Beaver Pocket.

C-O-D commented 2 months ago

In the desktop app I have to decide between public or users and choose public. The desktop app then creates the Beaver Notes [date] folder directly under public during the manual backup...but no pocket folder

C-O-D commented 2 months ago

the desktop app cannot access the root folder, just as I cannot

Daniele-rolli commented 2 months ago

The Pocket folder is created by Beaver Pocket. Try exporting using Beaver Pocket first, and then select the folder called Beaver-Pocket in Beaver Notes to export there. Otherwise, create the Beaver Pocket folder manually.

C-O-D commented 2 months ago

I have tried to copy the Beaver Notes 2004-09-08 in both the public and the users/[username] folder, both with and without the beaver-pocket parent folder, but it always produces the same error message...

C-O-D commented 2 months ago

Exporting in Beaver pocket does exactly nothing

Daniele-rolli commented 2 months ago

So, it doesn't read from or write to WebDAV, right?

C-O-D commented 2 months ago

It seems so

C-O-D commented 2 months ago

I also tried https://webdav.hidrive.ionos.com/public/ but it doesn't write to it.

Daniele-rolli commented 2 months ago

If you open the link https://webdav.hidrive.ionos.com/ in a browser, does it let you log in, or does it show any errors?

C-O-D commented 2 months ago

It first shows:

Unauthorized This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.

Bad when I refresh the page manually a pop up for credentials comes up an I can login

Daniele-rolli commented 2 months ago

The issue doesn't appear to be with the connection, although the path seems to be wrong, but rather with the code. I'll be working on fixing it, and a new release candidate will be pushed in the coming weeks. Unfortunately, since this is beta software, bugs like this are to be expected. I apologize again for the inconvenience.

C-O-D commented 2 months ago

Just a suggestion, we can also leave the whole thing and I'll wait until you have implemented FTP because at the latest then I will cancel this webDAV account again anyway

Daniele-rolli commented 2 months ago

By the way, if there's an option to disable digest authentication, please use it. The issue appears to be specific to this authentication method. I’ve primarily tested it with Nextcloud, which doesn’t use digest authentication.

C-O-D commented 2 months ago

No problem, no need to apologize. I will cancel the Web DAV account and then use Beaver pocket later (especially since there is another error that prevents me from using it) and first deal with the desktop app, which is also new to me.

Btw, I can't find an option for digest authentication at all

C-O-D commented 2 months ago

Hey, thanks for trying to help and for taking the time at such short notice 👍

Manukineko commented 2 months ago

Hello, The same issue occurs with pCloud's webdav access on iOS. The address is https://webdav.pcloud.com + a subfolder that already exists, but Beaver Pocket send the same error than C-O-D got. I need to mention that that URL scheme works perfectly with other app I use (Documents 5, Taio, etc)

If you can, adding a native integration of pCloud in addition of the others you mentionned above would be great ;D

Daniele-rolli commented 1 month ago

Sorry for the delay. I've been working on Beaver Pocket non-stop. I've rewritten the WebDAV logic for Android using OkHttp and also fixed the iOS implementation. On top of that, I've worked on adding support for more platforms. I encountered some issues with pCloud and tried to contact the developers, but I had no luck. I hope the WebDAV fixes will work with pCloud too. As for SFTP, we currently have no way of implementing it, especially on iOS. I apologize for any inconvenience this may cause. I hope the next release candidate in mid-October, which includes the WebDAV fixes, will help resolve your issues.

C-O-D commented 1 month ago

I really appreciate your efforts but I don't really want to pay extra for a web-dav account if I only want to synchronize on my home network. It would be really nice if in the future there was a way to synchronize your data in your home network without the detour via third party providers or the internet.

Daniele-rolli commented 1 month ago

I’m sorry if I misunderstood or if something got lost in translation. To clarify, we don’t offer any paid sync services on our end. Some cloud providers, like pCloud, do charge for WebDAV access, but that’s out of our control. If you're interested in syncing with something like your own Nextcloud server, beaver is completely free.

C-O-D commented 1 month ago

No, no misunderstanding, I realize that and that's not what I meant. The point is that I don't know of any free web-dav provider and I think it would be overkill to set up my own server in view of the fact that I only want to synchronize some data on my own home network

C-O-D commented 1 month ago

...but as I already mentioned, I would also be completely happy with the possibility to simply import my data on Android from the internal storage - I could then easily do the synchronization with 'Syncthing'...

Best regards