add image conver button
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user