megatools
megatools copied to clipboard
uploaded files not seen by shared users
All the file uploaded to a shared folder cannot be seen by any share user, on the mobile app they see a NO_KEY file
Megatools don't support creating or writing to shared folders.
This feature would be very useful.
I use megatools
for uploading large files in a shared folder, but I always need to generate a new link in order to make the last files accessible by shared users.
This will work in 2.0, because that version will support sharing.
The issue is that megatools needs to send file key to everyone with whom the file is being shared. This requires getting their RSA public keys and calling a special api, that will send them encrypted file key, so that they can decrypt it with their private RSA key and access the newly uploaded file.
OK, thanks a lot for the explanation. Does it works the same way for a publicly shared folder (where the private key is embedded in the URL) ?
Also, is there already any expected release date for 2.0 ?
Yes, except that the RSA key is not used to communicate to the recipients what key was used to encrypt the individual file keys (share key). The share key is used directly (it's passed in the folder url).
No ETA, though you can watch progress in #84
Ok, thanks for everything. I'll follow this closely :smiley:. Good luck!
:)
Can you explain a bit more the case of publicly shared folder? In 2.0, would it be possible to just generate the shared link of a folder once and keep using it as new files are added in that folder, or would a new link still have to be generated every time?
Also, is there a workaround for this at the moment (i.e. get a link to a shared folder that will always display all the files in that folder, not just the files that were there when the link was created)?
Yes. When putting files or folders into a subtree of a folder, megatools will have to check and create a list of all shares set on all parent folders of a path where files or folders are put.
When the uploaded file is added to the filesystem via {a: 'p'} request, megatools will use share keys of all the above mentioned shares and encrypt the file/folder key of the uploaded/created/copied/moved file or folder with all applicable share keys.
So for example if you have a structure like /Root/share1/share2, where share1 is shared with bob and joe, and share2 is exported publicly (which is just a special case of folder sharing), and you move 100 files into /Root/share1/share2, megatools will take handles of share1, and share2, share keys for bob, joe, and public export, and will create 300 new file/folder keys for bob, joe, and public export, so that they can access the files.
This has to be done on every filesystem operation that operates on shared folders, to keep files properly shared. It should also be done smartly, so that copying/moving files within the same shared folder will not force the re-encryption of file/folder keys.
No workaround, atm. You can try to use megatools from the dev branch and use the new share or export command. That should export files that are not yet exported within a particular exported/shared folder.
Thanks for the thorough explanation. Waiting for v2.0 :)
Waiting for v2.0 too but when?
Not soon. It's just a hobby, and ATM I'm floded with paid work.
There are some changes in the dev branch that I haven't yet pushed out that implement part of the encrypted HTTP streaming, that are required for data transfers. (major missing thing in the dev branch atm.) When that's done the rest is a piece of cake.