add extension dropdown for image convert
This commit is contained in:
@@ -14,7 +14,7 @@ interface initMessageBody {
|
||||
token?: string
|
||||
}
|
||||
|
||||
export async function fileUpload(messageBody: initMessageBody, needConvert: boolean | undefined) {
|
||||
export async function fileUpload(messageBody: initMessageBody, convertTo: string | null | undefined) {
|
||||
const token = await getSessionData('token');
|
||||
if (!token) {
|
||||
return;
|
||||
@@ -23,8 +23,8 @@ export async function fileUpload(messageBody: initMessageBody, needConvert: bool
|
||||
message.action = 'init';
|
||||
message.token = token;
|
||||
|
||||
// нужно будет добавить свойство needConvert в тело запроса.
|
||||
// console.log(needConvert);
|
||||
// нужно будет добавить свойство convertTo в тело запроса он может прийти со значением reject тогда конвертировать не нужно.
|
||||
// console.log(convertTo);
|
||||
|
||||
try {
|
||||
const response = await fetch(`${API_BASE_URL}/api/v1/data`, {
|
||||
|
||||
Reference in New Issue
Block a user