|
@@ -77,7 +77,13 @@ axios.interceptors.request.use(async (config) => {
|
|
|
const fromData = new FormData();
|
|
|
|
|
|
Object.keys(config.data).forEach((key) => {
|
|
|
- fromData.append(key, config.data[key]);
|
|
|
+ if (key === "files") {
|
|
|
+ Array.from(config.data[key]).forEach((file) => {
|
|
|
+ fromData.append("files", file as any as File);
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ fromData.append(key, config.data[key]);
|
|
|
+ }
|
|
|
});
|
|
|
config.data = fromData;
|
|
|
config.headers["Content-Type"] = "multipart/form-data";
|