These are chat archives for HelloZeroNet/ZeroNet

20th
Apr 2015
Otto Rask
@rask
Apr 20 2015 11:30
Is there any more documentation on cmd('fileWrite'...) than in the RTD documentation and the source codes?
I'm not sure if I'm understanding correctly, but are we allowed to write other files than the content.json file at all? I'm trying to write a markdown file to a subfolder that contains blog contents.
fileWrite makes the WebSocketUI drop the connection with a code 1000
Otto Rask
@rask
Apr 20 2015 11:39
def actionFileWrite(self, to, inner_path, content_base64): I presume the to parameter is something the ws object injects to the cmd arguments before calling the wanted action?
ContentManager.py returns an error on line 114: WebSocket error: TypeError: 'bool' object has no attribute '__getitem__'
I'm not good at CoffeeScript, so the example is a little vague on that part for me. perhaps add vanilla JS examples alongside the CS examples?
Otto Rask
@rask
Apr 20 2015 12:02
does the fileWrite command even allow writing new files or can we only modify existing files?
i'm getting False from getFileInfo inside ContentManager.py, which means it cant find the inner_path file if I'm correct?
ZeroNet
@HelloZeroNet
Apr 20 2015 22:00
Rask: The to parameter is indicates the requester message id. Every time you send a command on websocket it got an unique id (simple incremented integer) and if the server got result for that then he includes the unique id in the response. This allows to make non-syncronized requests.
Can you please paste the full line from the log/debug.log so i can look after it?
ZeroNet
@HelloZeroNet
Apr 20 2015 22:08
I was able to reproducate the problem: if you dont have own: true in sites.json file at your site, than its only allows to write file you have permission. But the websocket error is not normal, working on fix