server path
This commit is contained in:
@@ -3,7 +3,7 @@ import BreadcrumbComBS from "../breadcrumb/BreadcrumbComBS";
|
|||||||
import {useState, useRef} from "react";
|
import {useState, useRef} from "react";
|
||||||
|
|
||||||
export default function MyMedia() {
|
export default function MyMedia() {
|
||||||
|
const basePath = process.env.REACT_APP_MAIN_API
|
||||||
const [selectedFile, setSelectedFile] = useState(null);
|
const [selectedFile, setSelectedFile] = useState(null);
|
||||||
const [message, setMessage] = useState('');
|
const [message, setMessage] = useState('');
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ export default function MyMedia() {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// Replace with your actual API endpoint URL
|
// Replace with your actual API endpoint URL
|
||||||
const apiEndpoint = 'https://devapi.mermsemr.com/upload/webfiles';
|
const apiEndpoint = basePath + '/upload/webfiles';
|
||||||
const response = await fetch(apiEndpoint, {
|
const response = await fetch(apiEndpoint, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
// The browser automatically sets the 'Content-Type' header to
|
// The browser automatically sets the 'Content-Type' header to
|
||||||
|
|||||||
Reference in New Issue
Block a user