server path
This commit is contained in:
@@ -3,7 +3,7 @@ import BreadcrumbComBS from "../breadcrumb/BreadcrumbComBS";
|
||||
import {useState, useRef} from "react";
|
||||
|
||||
export default function MyMedia() {
|
||||
|
||||
const basePath = process.env.REACT_APP_MAIN_API
|
||||
const [selectedFile, setSelectedFile] = useState(null);
|
||||
const [message, setMessage] = useState('');
|
||||
|
||||
@@ -28,7 +28,7 @@ export default function MyMedia() {
|
||||
|
||||
try {
|
||||
// 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, {
|
||||
method: 'POST',
|
||||
// The browser automatically sets the 'Content-Type' header to
|
||||
|
||||
Reference in New Issue
Block a user