fileType instead parsing url to save doc in Python (take fileType out of body)

This commit is contained in:
Andrey Yumatov
2021-12-23 18:24:28 +03:00
parent 058b0c4f23
commit dab9e4bb16

View File

@ -60,7 +60,7 @@ def processSave(body, filename, usAddr):
newFilename = filename
curExt = fileUtils.getFileExt(filename) # get current file extension
downloadExt = fileUtils.getFileExt(download) # get the extension of the downloaded file
downloadExt = body.get('fileType') # get the extension of the downloaded file
# convert downloaded file to the file with the current extension if these extensions aren't equal
if (curExt != downloadExt):
@ -106,7 +106,7 @@ def processForceSave(body, filename, usAddr):
if (download is None):
raise Exception("DownloadUrl is null")
curExt = fileUtils.getFileExt(filename) # get current file extension
downloadExt = fileUtils.getFileExt(download) # get the extension of the downloaded file
downloadExt = body.get('fileType') # get the extension of the downloaded file
newFilename = False
# convert downloaded file to the file with the current extension if these extensions aren't equal