小编Moh*_*agd的帖子

使用angular将文件上传到firebase时如何处理firebase存储中的两个存储桶

在 app.module

AngularFireModule.initializeApp(environment.firebaseConfig)
Run Code Online (Sandbox Code Playgroud)

我有两个存储

firebaseConfig: {
    apiKey: 'AIzaSyBHsAxVgiuM0_xLd3BunTG6Yf9x1nynxoA',
    authDomain: 'careerograph-e9963.firebaseapp.com',
    databaseURL: 'https://careerograph-e9963.firebaseio.com',
    projectId: 'careerograph-e9963',
    storageBucket: 'careerograph-e9963.appspot.com',
    messagingSenderId: '669874223858'
  },
  firebaseExcelConfig: {
    apiKey: 'AIzaSyBHsAxVgiuM0_xLd3BunTG6Yf9x1nynxoA',
    authDomain: 'careerograph-e9963.firebaseapp.com',
    databaseURL: 'https://careerograph-e9963.firebaseio.com',
    projectId: 'careerograph-e9963',
    messagingSenderId: '669874223858',
    storageBucket: 'careerograph-excel',
  },
Run Code Online (Sandbox Code Playgroud)

在我注入构造函数私有存储的组件中:AngularFireStorage 然后调用

this.task = this.storage.upload(this.path, file, { customMetadata });
Run Code Online (Sandbox Code Playgroud)

如何选择一个存储桶将文件上传到它

buckets firebase firebase-storage angular

5
推荐指数
1
解决办法
843
查看次数

标签 统计

angular ×1

buckets ×1

firebase ×1

firebase-storage ×1