How to use the @react-native-firebase/app/lib/common.toFilePath function in @react-native-firebase/app

To help you get started, we’ve selected a few @react-native-firebase/app examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github invertase / react-native-firebase / packages / storage / lib / StorageReference.js View on Github external
downloadFile(filePath) {
    console.warn(
      "firebase.storage.Reference.downloadFile() is deprecated, please rename usages to 'writeToFile()'",
    );
    return this.writeToFile(toFilePath(filePath));
  }
github invertase / react-native-firebase / packages / storage / lib / StorageReference.js View on Github external
return new StorageDownloadTask(this, task =>
      this._storage.native.writeToFile(this.toString(), toFilePath(filePath), task._id),
    );
github invertase / react-native-firebase / packages / ml-vision / lib / index.js View on Github external
);

    if (!isString(localImageFilePath)) {
      throw new Error(
        "firebase.vision().imageLabelerProcessImage(*) 'localImageFilePath' expected a string local file path.",
      );
    }

    let options;
    try {
      options = visionImageLabelerOptions(imageLabelerOptions);
    } catch (e) {
      throw new Error(`firebase.vision().imageLabelerProcessImage(_, *) ${e.message}.`);
    }

    return this.native.imageLabelerProcessImage(toFilePath(localImageFilePath), options);
  }
github invertase / react-native-firebase / packages / ml-vision / lib / index.js View on Github external
);

    if (!isString(localImageFilePath)) {
      throw new Error(
        "firebase.vision().cloudImageLabelerProcessImage(*) 'localImageFilePath' expected a string local file path.",
      );
    }

    let options;
    try {
      options = visionCloudImageLabelerOptions(cloudImageLabelerOptions);
    } catch (e) {
      throw new Error(`firebase.vision().cloudImageLabelerProcessImage(_, *) ${e.message}.`);
    }

    return this.native.cloudImageLabelerProcessImage(toFilePath(localImageFilePath), options);
  }
github invertase / react-native-firebase / packages / ml-vision / lib / index.js View on Github external
cloudTextRecognizerProcessImage(localImageFilePath, cloudTextRecognizerOptions) {
    if (!isString(localImageFilePath)) {
      throw new Error(
        "firebase.vision().cloudTextRecognizerProcessImage(*) 'localImageFilePath' expected a string local file path.",
      );
    }

    let options;
    try {
      options = visionCloudTextRecognizerOptions(cloudTextRecognizerOptions);
    } catch (e) {
      throw new Error(`firebase.vision().cloudTextRecognizerProcessImage(_, *) ${e.message}`);
    }

    return this.native.cloudTextRecognizerProcessImage(toFilePath(localImageFilePath), options);
  }
github invertase / react-native-firebase / packages / ml-vision / lib / index.js View on Github external
throw new Error(
        "firebase.vision().cloudDocumentTextRecognizerProcessImage(*) 'localImageFilePath' expected a string local file path.",
      );
    }

    let options;
    try {
      options = visionCloudDocumentTextRecognizerOptions(cloudDocumentTextRecognizerOptions);
    } catch (e) {
      throw new Error(
        `firebase.vision().cloudDocumentTextRecognizerProcessImage(_, *) ${e.message}.`,
      );
    }

    return this.native.cloudDocumentTextRecognizerProcessImage(
      toFilePath(localImageFilePath),
      options,
    );
  }
github invertase / react-native-firebase / packages / ml-vision / lib / index.js View on Github external
cloudLandmarkRecognizerProcessImage(localImageFilePath, cloudLandmarkRecognizerOptions) {
    if (!isString(localImageFilePath)) {
      throw new Error(
        "firebase.vision().cloudLandmarkRecognizerProcessImage(*) 'localImageFilePath' expected a string local file path.",
      );
    }

    let options;
    try {
      options = visionCloudLandmarkRecognizerOptions(cloudLandmarkRecognizerOptions);
    } catch (e) {
      throw new Error(`firebase.vision().cloudLandmarkRecognizerProcessImage(_, *) ${e.message}.`);
    }

    return this.native.cloudLandmarkRecognizerProcessImage(toFilePath(localImageFilePath), options);
  }
github invertase / react-native-firebase / packages / ml-vision / lib / index.js View on Github external
if (!isString(localImageFilePath)) {
      throw new Error(
        "firebase.vision().faceDetectorProcessImage(*) 'localImageFilePath' expected a string local file path.",
      );
    }

    let options;
    try {
      options = visionFaceDetectorOptions(faceDetectorOptions);
    } catch (e) {
      throw new Error(
        `firebase.vision().faceDetectorProcessImage(_, *) 'faceDetectorOptions' ${e.message}.`,
      );
    }

    return this.native.faceDetectorProcessImage(toFilePath(localImageFilePath), options);
  }
github invertase / react-native-firebase / packages / storage / lib / StorageReference.js View on Github external
return new StorageUploadTask(this, task =>
      this._storage.native.putFile(this.toString(), toFilePath(filePath), metadata, task._id),
    );
github invertase / react-native-firebase / packages / ml-vision / lib / index.js View on Github external
barcodeDetectorProcessImage(localImageFilePath, barcodeDetectorOptions) {
    if (!isString(localImageFilePath)) {
      throw new Error(
        "firebase.vision().barcodeDetectorProcessImage(*) 'localImageFilePath' expected a string local file path.",
      );
    }

    let options;
    try {
      options = visionBarcodeDetectorOptions(barcodeDetectorOptions);
    } catch (e) {
      throw new Error(`firebase.vision().barcodeDetectorProcessImage(_, *) ${e.message}`);
    }

    return this.native.barcodeDetectorProcessImage(toFilePath(localImageFilePath), options);
  }
}

@react-native-firebase/app

A well tested, feature rich Firebase implementation for React Native, supporting iOS & Android. Individual module support for Admob, Analytics, Auth, Crash Reporting, Cloud Firestore, Database, Dynamic Links, Functions, Messaging (FCM), Remote Config, Sto

Apache-2.0
Latest version published 27 days ago

Package Health Score

98 / 100
Full package analysis