[ios][storage] getMetaData --> getMetadata renamed
This commit is contained in:
parent
86512320f0
commit
b012bf22f6
|
@ -126,12 +126,12 @@ RCT_EXPORT_METHOD(getDownloadURL: (NSString *) path resolver:(RCTPromiseResolveB
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
getMetaData
|
getMetadata
|
||||||
|
|
||||||
@url https://firebase.google.com/docs/reference/js/firebase.storage.Reference#getMetaData
|
@url https://firebase.google.com/docs/reference/js/firebase.storage.Reference#getMetadata
|
||||||
@param NSString path
|
@param NSString path
|
||||||
*/
|
*/
|
||||||
RCT_EXPORT_METHOD(getMetaData: (NSString *) path resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) {
|
RCT_EXPORT_METHOD(getMetadata: (NSString *) path resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) {
|
||||||
FIRStorageReference *fileRef = [self getReference:path];
|
FIRStorageReference *fileRef = [self getReference:path];
|
||||||
|
|
||||||
[fileRef metadataWithCompletion:^(FIRStorageMetadata * _Nullable metadata, NSError * _Nullable error) {
|
[fileRef metadataWithCompletion:^(FIRStorageMetadata * _Nullable metadata, NSError * _Nullable error) {
|
||||||
|
@ -203,6 +203,7 @@ RCT_EXPORT_METHOD(downloadFile: (NSString *) path localPath:(NSString *) localPa
|
||||||
|
|
||||||
[downloadTask observeStatus:FIRStorageTaskStatusFailure handler:^(FIRStorageTaskSnapshot *snapshot) {
|
[downloadTask observeStatus:FIRStorageTaskStatusFailure handler:^(FIRStorageTaskSnapshot *snapshot) {
|
||||||
// download task failed
|
// download task failed
|
||||||
|
// TODO sendJSError event
|
||||||
if (snapshot.error != nil) {
|
if (snapshot.error != nil) {
|
||||||
[self promiseRejectStorageException:reject error:snapshot.error];
|
[self promiseRejectStorageException:reject error:snapshot.error];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue