megatools icon indicating copy to clipboard operation
megatools copied to clipboard

uploaded files not seen by shared users

Open matrog opened this issue 10 years ago • 14 comments

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

matrog avatar Aug 25 '14 07:08 matrog

Megatools don't support creating or writing to shared folders.

Megous avatar Oct 23 '14 16:10 Megous

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.

connesc avatar Jan 05 '15 18:01 connesc

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.

Megous avatar Jan 06 '15 20:01 Megous

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 ?

connesc avatar Jan 07 '15 08:01 connesc

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).

Megous avatar Jan 07 '15 16:01 Megous

No ETA, though you can watch progress in #84

Megous avatar Jan 07 '15 16:01 Megous

Ok, thanks for everything. I'll follow this closely :smiley:. Good luck!

connesc avatar Jan 07 '15 18:01 connesc

:)

Megous avatar Jan 07 '15 18:01 Megous

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)?

chinhodado avatar Feb 12 '15 17:02 chinhodado

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.

Megous avatar Feb 12 '15 18:02 Megous

Thanks for the thorough explanation. Waiting for v2.0 :)

chinhodado avatar Feb 18 '15 16:02 chinhodado

Waiting for v2.0 too but when?

festum avatar May 18 '16 07:05 festum

Not soon. It's just a hobby, and ATM I'm floded with paid work.

Megous avatar May 18 '16 15:05 Megous

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.

Megous avatar May 18 '16 15:05 Megous