如何在Firebase数据库中上载视频?

如何在Firebase数据库中上载视频?,firebase,firebase-realtime-database,firebase-storage,Firebase,Firebase Realtime Database,Firebase Storage,有人能帮我在Firebase数据库上传视频吗 // Create file metadata including the content type var metadata = { contentType: 'image/jpeg', }; // Upload the file and metadata var uploadTask = storageRef.child('images/mountains.jpg').put(file, metadata); 您不能使用实时数据库来存

有人能帮我在Firebase数据库上传视频吗

// Create file metadata including the content type
var metadata = {
    contentType: 'image/jpeg',
};

// Upload the file and metadata
var uploadTask = storageRef.child('images/mountains.jpg').put(file, metadata);

您不能使用实时数据库来存储/上传文件(我猜您在存储大文件时会想到RDBMS中的BLOB/CLOB)

您可以尝试将其上载为

或作为一个,这在文档中进行了讨论

// Uint8Array
var bytes = new Uint8Array([0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x2c, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x21]);
ref.put(bytes).then(function(snapshot) {
    console.log('Uploaded an array!');
});

您不能使用实时数据库来存储/上传文件(我猜您在存储大文件时会想到RDBMS中的BLOB/CLOB)

您可以尝试将其上载为

或作为一个,这在文档中进行了讨论

// Uint8Array
var bytes = new Uint8Array([0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x2c, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x21]);
ref.put(bytes).then(function(snapshot) {
    console.log('Uploaded an array!');
});