add region(lang) param to convert

This commit is contained in:
Oleg Sinizin
2021-10-14 17:10:20 +03:00
committed by Sergey Linnik
parent 34b066f846
commit a9e2df73ca
19 changed files with 51 additions and 31 deletions

View File

@ -31,7 +31,7 @@ import config
from . import fileUtils, jwtManager
# convert file and give url to a new file
def getConverterUri(docUri, fromExt, toExt, docKey, isAsync, filePass = None):
def getConverterUri(docUri, fromExt, toExt, docKey, isAsync, filePass = None, lang = None):
if not fromExt: # check if the extension from the request matches the real file extension
fromExt = fileUtils.getFileExt(docUri) # if not, overwrite the extension value
@ -43,7 +43,8 @@ def getConverterUri(docUri, fromExt, toExt, docKey, isAsync, filePass = None):
'filetype': fromExt.replace('.', ''),
'title': title,
'key': docKey,
'password': filePass
'password': filePass,
'region': lang
}
headers={'accept': 'application/json'}