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

112
Vistas
React-Native-fs wont open my uri from document-picker

I pick a file via DocumentPicker, get the URI, and pass it to a function which should open my Document (csv). But i get the Error ENSCOCOAERRORDOMAIN260.
Also i tried to see if there's an file -nope. But i just selected it via DocumentPicker (i get Filename, size, etc via it)

That would be the function:

 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);
      });
  } 

it throws console.log('ERROR, theres is nothing');.. buut i know there should be something.

Any recommandings?
Huge Thanks

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