Closed k2s closed 4 years ago
Hey! I think you can use the isOwner
flag in the data returned by archive.getInfo
Thank you for answer. I don't need to read information, but to set the archive to writable mode.
I forgot to mention that I use it in NodeJS.
In node.js if you created the archive with DatArchive it should be loading the secret key automatically. Otherwise you need to pass in the secret key each time to make it writable.
I have created the dat archive with command line tool dat
on different PC. dat sync
is running there. Now I want to connect to this dat repository. which works fine until I provide secretKey
.
The value I set to secretKey is string output from command dat keys export
. With this key provided the DatArchive stops to even to list the content of the archive which works without the secretKey
option.
Dat breaks if you try to set the secret key on more than one device at a time. If you want to update an archive from more than one machine, I suggest looking into Kappa-Drive or the mounts feature in Hyperdrive-daemon
secretKey===null
then on my dat it prints number 3 andwriteFile
fails with errorCannot write to this archive ; Not the owner
secretKey
set to value returned bydat keys export
it prints number 0 and write doesnt fail, but it doesn't get created in original repositoryis this bug or how should I provide secretKey to be able to write to the repository ?