Radiks - Large Shared File and Group Key


I am trying to store a large file (excel) that is going to be shared among a group. It’s a large blob of data (10 MB) and I do NOT want to store this file in the Radiks MongoDB. I want to store the file in the original users gaia bucket and share the group key among the group members.

Does Radiks offer a simple solution for this? Or do you have a recommended model for this situation?

1 Like

I would recommend creating a normal model to represent your file, and just have an attribute like gaiaURL that is a reference to the actual file. Then, you can make that model part of a UserGroup and the other members will have access. When you want to actually download the file, you just fetch it from Gaia.

Now, I think the second part of the question is that you want to encrypt your file with the UserGroup's private key. There isn’t a built-in way to do putFile with a group key, but that sounds like a nice feature. For now, you can just get the UserGroup's public key, and call putFile(name, contents, { encrypt: myUserGroupKey }), and blockstack.js will encrypt with the private key you provide. Later, you can call getFile, and similarly pass the private key to the decrypt parameter.

1 Like

Thanks! Thats the approach I was thinking too :+1: