Django Rest Framework Keeps giving CSRF Failed, Origin checking failed

Hello, I am working on a cloud storage website project, with a DRF backend and a react frontend. My upload view keeps giving me a 403 error, with details of: CSRF Failed: Origin checking failed - http://127.0.0.1:8000/ does not match any trusted origins.
This is particularly strange as I have other views that do not give this error, including a get view that is fetched on the same react router page as the problematic view. Provided below is the fetch request, and view responsible for the error:

// Problematic Fetch Request 
const uploadFile = async () => {
        const file = fileRef.current.files[0]
        const tags = tagRef.current
        const formData = new FormData();
        formData.append('file', file);
        formData.append('tags', tags);
        console.log(getCookie('csrftoken'))
        let response;
        try {
            response = await fetch(`/storage/upload`, {
                headers: {
                    'X-CSRFToken': getCookie('csrftoken'),
                },
                credentials: 'include', 
                method: 'POST',
                body: formData
            })
            console.log(response.status)
        } catch (error) {
            console.error('Error uploading file:', error);
        }
    }
// Problematic View
class FileUpload(APIView):
    permission_classes = [permissions.IsAuthenticated]
    authentication_classes = [SessionAuthentication]
    def post(self, request):
        return Response(status=status.HTTP_200_OK)

Any help would be appreciated, thank you!

Here is a relevant portion of my settings.py

CORS_ALLOWED_ORIGINS = [
    'http://localhost:3000',
    'http://127.0.0.1:8000'
]
CORS_ALLOW_CREDENTIALS = True

# Application definition

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'rest_framework',
    'corsheaders',
    'user_api.apps.UserApiConfig',
    'storage.apps.StorageConfig'
]

MIDDLEWARE = [
    'corsheaders.middleware.CorsMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.middleware.security.SecurityMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
]