add convertTo for fileUpload
This commit is contained in:
@@ -11,7 +11,8 @@ interface initMessageBody {
|
||||
extension: string,
|
||||
file_size: number | string,
|
||||
action?: string,
|
||||
token?: string
|
||||
token?: string,
|
||||
convertTo? : string | undefined | null
|
||||
}
|
||||
|
||||
export async function fileUpload(messageBody: initMessageBody, convertTo?: string | null | undefined) {
|
||||
@@ -23,6 +24,10 @@ export async function fileUpload(messageBody: initMessageBody, convertTo?: strin
|
||||
message.action = 'init';
|
||||
message.token = token;
|
||||
|
||||
if (convertTo && convertTo !== 'reject') {
|
||||
message.convertTo = convertTo;
|
||||
}
|
||||
|
||||
// нужно будет добавить свойство convertTo в тело запроса он может прийти со значением reject тогда конвертировать не нужно.
|
||||
// console.log(convertTo);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user