Skip to content

Commit 81f3e2d

Browse files
authored
Feat: add UseEmulator to the storage SDK (#1354)
* Feat: add UseEmulator to the storage SDK * Fix: fix spacing and xml tags
1 parent 8889e36 commit 81f3e2d

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

docs/readme.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ Release Notes
112112
### 13.5.0
113113
- Changes
114114
- Firebase AI: Add support for receiving Live API Transcripts.
115+
- Storage: Add support for Firebase Storage emulator via `UseEmulator`.
116+
The `UseEmulator` method should be called before invoking any other
117+
methods on a new instance of Storage. Default port is 9199.
115118

116119
### 13.4.0
117120
- Changes

storage/src/FirebaseStorage.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,21 @@ public TimeSpan MaxOperationRetryTime {
258258
}
259259
}
260260

261+
/// <summary>
262+
/// Configures the Storage SDK to use an emulated backend instead of
263+
/// the default remote backend. This method should be called before invoking
264+
/// any other methods on a new instance of Storage
265+
/// </summary>
266+
/// <param name="host">
267+
/// The host that the storage emulator is running on.
268+
/// </param>
269+
/// <param name="port">
270+
/// The port that the storage emulator is running on.
271+
/// </param>
272+
public void UseEmulator(string host, int port) {
273+
storageInternal.UseEmulator(host, port);
274+
}
275+
261276
/// <summary>
262277
/// Creates a new
263278
/// <see cref="StorageReference" />

0 commit comments

Comments
 (0)