Skip to content

Commit

Permalink
Renames for Cloud Storage for Firebase (#921)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Wenger authored Mar 9, 2017
1 parent bda426d commit c4ac69f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
10 changes: 5 additions & 5 deletions docs/guide/uploading-downloading-binary-content.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ Firebase provides [a hosted binary storage service](https://firebase.google.com/
which enables you to store and retrieve user-generated content like images, audio, and
video directly from the Firebase client SDK.

Binary files are stored in a Firebase Storage bucket, not in the Realtime Database.
Binary files are stored in a Cloud Storage bucket, not in the Realtime Database.
The files in your bucket are stored in a hierarchical structure, just like
in the Realtime Database.

To use the Firebase Storage binding, first [create a Firebase Storage reference](https://firebase.google.com/docs/storage/web/create-reference).
To use the Cloud Storage for Firebase binding, first [create a Storage reference](https://firebase.google.com/docs/storage/web/create-reference).
Then, using this reference, pass it into the `$firebaseStorage` service:

```js
Expand All @@ -31,7 +31,7 @@ angular

// inject $firebaseStorage into our controller
function SampleCtrl($firebaseStorage) {
// create a Firebase Storage Reference for the $firebaseStorage binding
// create a Storage reference for the $firebaseStorage binding
var storageRef = firebase.storage().ref("userProfiles/physicsmarie");
var storage = $firebaseStorage(storageRef);
}
Expand All @@ -40,7 +40,7 @@ SampleCtrl.$inject = ["$firebaseStorage"];

## API Summary

The Firebase Storage service is created with several special `$` methods, all of which are listed in the following table:
The Cloud Storage for Firebase service is created with several special `$` methods, all of which are listed in the following table:

| Method | Description |
| ------------- | ------------- |
Expand All @@ -59,7 +59,7 @@ return an [[`UploadTask`](/docs/reference.md#upload-task)(https://firebase.googl

```js
function SampleCtrl($firebaseStorage) {
// create a Firebase Storage Reference for the $firebaseStorage binding
// create a Storage reference for the $firebaseStorage binding
var storageRef = firebase.storage().ref('userProfiles/physicsmarie');
var storage = $firebaseStorage(storageRef);
var file = // get a file from the template (see Retrieving files from template section below)
Expand Down
4 changes: 2 additions & 2 deletions docs/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ app.config(function() {
apiKey: "<API_Key>", // Your Firebase API key
authDomain: "<AUTH_DOMAIN>", // Your Firebase Auth domain ("*.firebaseapp.com")
databaseURL: "<DATABASE_URL>", // Your Firebase Database URL ("https://*.firebaseio.com")
storageBucket: "<STORAGE_BUCKET>" // Your Firebase Storage bucket ("*.appspot.com")
storageBucket: "<STORAGE_BUCKET>" // Your Cloud Storage for Firebase bucket ("*.appspot.com")
};
firebase.initializeApp(config);
});
Expand Down Expand Up @@ -988,7 +988,7 @@ section of our AngularFire guide for more information and a full example.
AngularFire includes support for [binary storage](/docs/guide/uploading-downloading-binary-content.md)
with the `$firebaseStorage` service.

The `$firebaseStorage` service takes a [Firebase Storage](https://firebase.google.com/docs/storage/) reference.
The `$firebaseStorage` service takes a [Storage](https://firebase.google.com/docs/storage/) reference.

```js
app.controller("MyCtrl", ["$scope", "$firebaseStorage",
Expand Down
9 changes: 4 additions & 5 deletions src/storage/FirebaseStorage.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
}

/**
* Take an Firebase Storage snapshot and unwrap only the needed properties.
* Take a Storage snapshot and unwrap only the needed properties.
*
* @param snapshot
* @returns An object containing the unwrapped values.
Expand All @@ -62,20 +62,19 @@
}

/**
* Determines if the value passed in is a Firebase Storage Reference. The
* Determines if the value passed in is a Storage Reference. The
* put method is used for the check.
*
* @param value
* @returns A boolean that indicates if the value is a Firebase Storage
* Reference.
* @returns A boolean that indicates if the value is a Storage Reference.
*/
function _isStorageRef(value) {
value = value || {};
return typeof value.put === 'function';
}

/**
* Checks if the parameter is a Firebase Storage Reference, and throws an
* Checks if the parameter is a Storage Reference, and throws an
* error if it is not.
*
* @param storageRef
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/FirebaseStorage.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ describe('$firebaseStorage', function () {
});

/**
* A Mock for Firebase Storage Tasks. It has the same .on() method signature
* A Mock for Cloud Storage for Firebase tasks. It has the same .on() method signature
* but it simply stores the callbacks without doing anything. To make something
* happen you call the makeProgress(), causeError(), or complete() methods. The
* empty methods are intentional noops.
Expand Down

0 comments on commit c4ac69f

Please sign in to comment.