Skip to content

Commit dfc0bd1

Browse files
committed
Fix donwloadUrl to use storageUrl from .plist.
- Use storageUrl from default config if not set otherwise in JS - Similar code exists on several other places that are not fixed since no tests prevent breaking stuff.
1 parent d005ab2 commit dfc0bd1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Diff for: ios/Firestack/FirestackStorage.m

+6-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,12 @@ - (dispatch_queue_t)methodQueue
2525
path:(NSString *) path
2626
callback:(RCTResponseSenderBlock) callback)
2727
{
28-
FIRStorageReference *storageRef = [[FIRStorage storage] referenceForURL:storageUrl];
28+
FIRStorageReference *storageRef;
29+
if (storageUrl == nil ) {
30+
storageRef = [[FIRStorage storage] reference];
31+
} else {
32+
storageRef = [[FIRStorage storage] referenceForURL:storageUrl];
33+
}
2934
FIRStorageReference *fileRef = [storageRef child:path];
3035
[fileRef downloadURLWithCompletion:^(NSURL * _Nullable URL, NSError * _Nullable error) {
3136
if (error != nil) {

0 commit comments

Comments
 (0)