Image uploading issue to the backend using Axios and FormData in React Native

I’m using Axios for backend requests to upload form data, including images. I’ve wrapped the image data as an object with properties like uri, name, etc. However, upon making the request, the response shows null for the image path and URL and the rest data is uploaded successfully. I dont have the access for backend but on postman the image is uploading.Could anyone provide guidance on how to troubleshoot this issue?

        const data = new FormData();
        // const fileUri = Platform.OS === 'ios' ? image.replace('file://', '') : image;
        const fileExtension = getFileExtension(image) || 'jpg'; // Default extension 'jpg'
        const fileName = `imageMed.${fileExtension}`;
        data.append('file', {
            uri: image,
            name: fileName,
            type: `image/${fileExtension}`,
        });

        data.append('name', MedicineName);
        data.append('dosage', dose);
        data.append('start_time', `${Newdate} ${Newtime}`);
        data.append('number_of_days', days);
        data.append('frequency', freNumber);
        data.append('days_of_the_week', '1,2,3');
        data.append('st_notification', !isNotify ? 0 : 1);
        data.append('st_critical', !priority ? 0 : 1);
        data.append('default_icon', selectedImage);
        data.append('medicine_schedules', 'test_string');

        let config = {
            method: 'post',
            maxBodyLength: Infinity,
            url: 'https://api-patient-dev.easy-health.app/medicines',
            headers: {
                'Content-Type': 'multipart/form-data',
                'Authorization': `Bearer ${access_token}`,
            },
            data: data
        };
        console.log(data);
        axios.request(config)
            .then((response) => {
                console.log(JSON.stringify(response.data));
                renderAlarmComponents(response.data, userId);
            })
            .catch((error) => {
                console.log(error);
            })
            .finally(() => {
                setShowLoader(false);
                // navigation.navigate('Dashboard', {
                //     isChanged: true,
                // });
            });
    }