|
@@ -270,6 +270,51 @@ Server:
|
|
|
`remaining` is a counter how many chunks will follow (so it equals the `chunk` value originally sent in the request) and the transfer is over after it hits `0`.
|
|
|
If `cancel` is `true` then the download of the file is canceled and an error message should be in `error`.
|
|
|
|
|
|
+### 2.5 Head command
|
|
|
+
|
|
|
+The `head` command requests the first 4 bytes of `file` from the server for further inspection by the client.
|
|
|
+
|
|
|
+Client:
|
|
|
+```
|
|
|
+{
|
|
|
+ "command": "head",
|
|
|
+ "file": string
|
|
|
+}
|
|
|
+```
|
|
|
+
|
|
|
+Server:
|
|
|
+```
|
|
|
+{
|
|
|
+ "command": "head",
|
|
|
+ "accept": bool,
|
|
|
+ "file": string,
|
|
|
+ "data": string,
|
|
|
+ "error": string
|
|
|
+}
|
|
|
+```
|
|
|
+`data` is a base64 encoded string containing the requested bytes of the file.
|
|
|
+
|
|
|
+### 2.6 Deleteme command
|
|
|
+
|
|
|
+The `deleteme` command allows a logged in user to delete their account on the server. This action needs to be confirmed with the users password.
|
|
|
+
|
|
|
+Client:
|
|
|
+```
|
|
|
+{
|
|
|
+ "command": "deleteme",
|
|
|
+ "pass": string
|
|
|
+}
|
|
|
+```
|
|
|
+
|
|
|
+Server:
|
|
|
+```
|
|
|
+{
|
|
|
+ "command": "deleteme",
|
|
|
+ "accept": bool,
|
|
|
+ "error": string
|
|
|
+}
|
|
|
+```
|
|
|
+If `accept` is true the user has been deleted and the connection will be closed by the server.
|
|
|
|
|
|
### TODO
|
|
|
|