We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 98599e5 + f96606d commit 662f29dCopy full SHA for 662f29d
1 file changed
frontend/src/pages/DocumentManager/UploadFile.tsx
@@ -1,5 +1,5 @@
1
import React, { useState, useRef } from "react";
2
-import axios from "axios";
+import { adminApi } from "../../api/apiClient";
3
import TypingAnimation from "../../components/Header/components/TypingAnimation.tsx";
4
import Layout from "../Layout/Layout.tsx";
5
@@ -22,14 +22,9 @@ const UploadFile: React.FC = () => {
22
formData.append("file", file);
23
24
try {
25
- const response = await axios.post(
+ const response = await adminApi.post(
26
`/api/v1/api/uploadFile`,
27
formData,
28
- {
29
- headers: {
30
- "Content-Type": "multipart/form-data"
31
- },
32
- }
33
);
34
console.log("File uploaded successfully", response.data);
35
} catch (error) {
0 commit comments