Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -41,7 +41,9 @@ class FileHandler(FileSystemEventHandler):
|
|
41 |
"type": "file-create",
|
42 |
"content": content,
|
43 |
"path": event.src_path,
|
|
|
44 |
}
|
|
|
45 |
websockets.broadcast(self.connected,json.dumps(new_event))
|
46 |
# websockets.broadcast(self.connected,f'File {event.src_path} has been created.')
|
47 |
|
|
|
41 |
"type": "file-create",
|
42 |
"content": content,
|
43 |
"path": event.src_path,
|
44 |
+
"name": event.src_path.split('/')[-1]
|
45 |
}
|
46 |
+
print(new_event)
|
47 |
websockets.broadcast(self.connected,json.dumps(new_event))
|
48 |
# websockets.broadcast(self.connected,f'File {event.src_path} has been created.')
|
49 |
|