add image conver button

This commit is contained in:
smanylov
2026-02-17 14:43:26 +07:00
parent 0c20109254
commit fad2a525ea
6 changed files with 90 additions and 30 deletions
+4 -1
View File
@@ -14,7 +14,7 @@ interface initMessageBody {
token?: string
}
export async function fileUpload(messageBody: initMessageBody) {
export async function fileUpload(messageBody: initMessageBody, needConvert: boolean | undefined) {
const token = await getSessionData('token');
if (!token) {
return;
@@ -23,6 +23,9 @@ export async function fileUpload(messageBody: initMessageBody) {
message.action = 'init';
message.token = token;
// нужно будет добавить свойство needConvert в тело запроса.
// console.log(needConvert);
try {
const response = await fetch(`${API_BASE_URL}/api/v1/data`, {
method: 'POST',