change html type to raw
This commit is contained in:
parent
cdf6957c1e
commit
962a06fa70
|
@ -1,6 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
# Share a text file to shrlok.
|
|
||||||
cat <(printf '{"type":"txt"}\0') "$1" \
|
|
||||||
| socat - UNIX-CONNECT:/run/shrlok/shr.sock \
|
|
||||||
| sed 's|/var/www/files|https://files.dece.space|' \
|
|
||||||
; echo
|
|
|
@ -67,7 +67,7 @@ class Handler(socketserver.StreamRequestHandler):
|
||||||
file_name = None
|
file_name = None
|
||||||
if header.get("type") == "txt":
|
if header.get("type") == "txt":
|
||||||
file_name = write_text(data, title=header.get("title"))
|
file_name = write_text(data, title=header.get("title"))
|
||||||
elif header.get("type") == "html":
|
elif header.get("type") == "raw":
|
||||||
file_name = write_content(data)
|
file_name = write_content(data)
|
||||||
else:
|
else:
|
||||||
print("Unknown type.")
|
print("Unknown type.")
|
||||||
|
|
Reference in a new issue