fix
This commit is contained in:
parent
51c8eacad5
commit
020fb04fc5
|
|
@ -64,9 +64,17 @@ export const fetchViaProxy = async (
|
||||||
return raw;
|
return raw;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (body instanceof File) {
|
if (
|
||||||
const res = await fetch(url, { body, headers: _headers });
|
data instanceof File ||
|
||||||
return await res.text();
|
(Array.isArray(data) && data[0] instanceof File)
|
||||||
|
) {
|
||||||
|
if (data instanceof File) {
|
||||||
|
const res = await fetch(url, { body: data, headers: _headers });
|
||||||
|
return await res.text();
|
||||||
|
} else {
|
||||||
|
const res = await fetch(url, { body: data[0], headers: _headers });
|
||||||
|
return await res.text();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
const res = await fetch(`${w.basehost ? w.basehost : ""}/_proxy`, {
|
const res = await fetch(`${w.basehost ? w.basehost : ""}/_proxy`, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue