Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

294
Views
Cómo cargar archivos de documentos (pdf, doc) a firebase en react native expo

Estoy tratando de cargar archivos doc desde expo cli a mi almacenamiento firebase en reaccionar nativo pero me da un error de red.

Uso el selector de documentos para obtener el archivo uri del almacenamiento y luego uso esta función para cargarlo en mi almacenamiento de Firebase.

 const uploadDocuments = () => { let recievedDocs = []; document.map(async (item, index) => { var docName = user.uid + Math.floor(Math.random() * 127212); const response = await fetch(item.uri); const blob = await response.blob(); var ref = firebase.storage().ref("postDocs/documents/" + docName); ref .put(blob) .then((res) => { ref .getDownloadURL() .then((url) => { recievedDocs.push(url); }) .catch((e) => { alert(e.message); }); }) .catch((e) => { alert(e.message); }); }); };

También uso esta función para cargar imágenes en el almacenamiento de Firebase desde el selector de imágenes y funciona bien allí, pero cuando uso esta misma función para el archivo de documentos uri que obtengo del selector de documentos para cargar, me da un error de red.

Aquí hay un error que recibo.

[Rechazo de promesa no manejado: TypeError: Solicitud de red fallida] en node_modules\whatwg-fetch\dist\fetch.umd.js:535:17 en setTimeout$argument_0 en node_modules\react-native\Libraries\Core\Timers\JSTimers.js: 130:14 en _callTimer en node_modules\react-native\Libraries\Core\Timers\JSTimers.js:383:16 en callTimers en node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:416:4 en __callFunction en node_modules\ react-native\Libraries\BatchedBridge\MessageQueue.js:109:6 en __guard$argument_0 en node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:364:10 en __guard en node_modules\react-native\Libraries\BatchedBridge\ MessageQueue.js:108:4 en callFunctionReturnFlushedQueue

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!