We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 90fef0b commit e9fae86Copy full SHA for e9fae86
src/pages/vision/vision.ts
@@ -42,11 +42,13 @@ export class VisionPage {
42
// Show loader
43
this.loading.present();
44
45
- const timestamp = new Date().getTime().toString();
46
- const path = `${timestamp}.jpg`;
+ // const timestamp = new Date().getTime().toString();
+ const docId = this.afs.createId();
47
+
48
+ const path = `${docId}.jpg`;
49
50
// Make a reference to the future location of the firestore document
- const photoRef = this.afs.collection('photos').doc(timestamp)
51
+ const photoRef = this.afs.collection('photos').doc(docId)
52
53
// Firestore observable
54
this.result$ = photoRef.valueChanges()
0 commit comments