Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

197
Vistas
Error: firebase.firestore().collection().doc(*) 'documentPath' must point to a document in React Native

When I am trying to update my document in firebase I got an error like my topic. After I upload my image to firebase storage and I need to update the download link to my Users collection.(I used Redux-Saga for this process)

export function* uploadProfile(action) {
    console.log(action);
    const filePath = action.data.filePath;
    const fileName = action.data.fileName;
    const userID = action.data.userID;
    try {
        const uploadProfile = yield call(uploadFileFireBase, filePath, fileName)
        if (uploadProfile) {
            try {
                const updateProfile = yield call(updateUserFirebase, userID, uploadProfile)
               
                if (updateProfile) {

                }
            } catch (error) {
                console.log(error)
            }
        }
    } catch (error) {
        console.log(error)
    }
}


async function uploadFileFireBase(filePath, fileName) {
    const reference = storage().ref(fileName);
    await reference.putFile(filePath.toString());
    // console.log("Download URL:" + url)
    return await storage().ref(fileName).getDownloadURL();
}


/*
Update User Data
*/

function updateUserFirebase(uploadProfile, userID) {
    return firestore()
        .collection('Users')
        .doc(userID)
        .update({
            profileImage: uploadProfile,
        })
        .then((data) => {
            console.log('User updated!');
            return data;
        });
}

I spent hours and hours trying to make this write and I couldn't. So I really really need your help with this university project. Thank you very much for your time.❤️❤️

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda