Commit 8612f51d authored by setop's avatar setop 🚀
Browse files

add type property as mimetype from magic

parent f527356b
......@@ -3,6 +3,7 @@
import baker
import os
from tqdm import tqdm
import magic
from websocket import create_connection
from json import loads, dumps
from sjcl import SJCL, sjcl
......@@ -24,6 +25,7 @@ def upload(filepath, url, delay=None, del_at_first_view=False):
(e, r) = divmod(size, CHUNK_SIZE)
totalparts = e + [0, 1][r > 0]
meta = {"name": filepath.split("/")[-1],
"type" : magic.from_file(filepath, mime=True),
"size": size,
"total": totalparts,
"i": 0,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment