forked from mia/0x0
Fix mime splitting
mime[:mime.find(";")] will remove last character if mime does not contain ";". Use mime.split(";") instead.
This commit is contained in:
parent
9c4a0fd5a6
commit
0db6e4b895
1 changed files with 1 additions and 1 deletions
2
fhost.py
2
fhost.py
|
@ -162,7 +162,7 @@ class File(db.Model):
|
|||
|
||||
def get_ext(mime):
|
||||
ext = "".join(Path(file_.filename).suffixes[-2:])
|
||||
gmime = mime[:mime.find(";")]
|
||||
gmime = mime.split(";")[0]
|
||||
guess = guess_extension(gmime)
|
||||
|
||||
app.logger.debug(f"extension - specified: '{ext}' - detected: '{guess}'")
|
||||
|
|
Loading…
Reference in a new issue