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

107
Views
React-Native-fs no abre mi uri desde el selector de documentos

Elijo un archivo a través de DocumentPicker, obtengo el URI y lo paso a una función que debería abrir mi Documento (csv). Pero me sale el error ENSCOCOAERRORDOMAIN260 .
También traté de ver si hay un archivo, no. Pero acabo de seleccionarlo a través de DocumentPicker (obtengo el nombre de archivo, el tamaño, etc. a través de él)

Esa sería la función:

 async readCSVsaveTOJson(uri){ var RNFS = require('react-native-fs'); //console.log(RNFS.TemporaryDirectoryPath); realDoc = uri.replace('file:/', ''); console.log(realDoc); var kacke = ''; var counter = 0; for(var i in realDoc){ if(counter > 0){ kacke += realDoc[i]; } counter++; } console.log('exists?'); console.log(RNFS.exists(kacke)); RNFS.readDir(kacke') .then((result) => { // stat the first file console.log('result'); return Promise.all([RNFS.stat(result[0].path), result[0].path]); }) .then((statResult) => { if (statResult[1].isFile()) { // if we have a file, read it var content = RNFS.readFile(kacke); console.log('--------------------------'); console.log(content); return RNFS.readFile(statResult[1], 'utf8'); } return 'no file'; }) .then((contents) => { // log the file contents console.log(contents); }) .catch((err) => { console.log('ERROR, theres is nothing'); console.log(err.message, err.code); }); }

lanza console.log('ERROR, theres is nothing'); .. pero sé que debe haber algo.

¿Alguna recomendación?
Muchas gracias

about 4 years ago · Santiago Trujillo
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!