尝试将图像文件和pdf文件上传到Firebase存储,图像上传工作完美,而pdf文件上传时代码返回非常相似
未捕获错误:此浏览器似乎不支持创建Blob.
NodeJS,ReactJS
请参阅下面的代码
// post resume to firebase
function PostResumeToFirebase(id, resume){
console.log("inside PostResumeToFirebase -------")
resume.resume_files.forEach((data) => {
console.log("file inside post resume", data)
const file = data
var storageRef = firebase.storage().ref()
// Upload file and metadata to the object
const uploadTask = storageRef.child('applicants/resume/' + file.name).put(file);
// Listen to state changes, errors, and completion of the upload.
uploadTask.on(firebase.storage.TaskEvent.STATE_CHANGED,
function(snapshot) {
// Get task progress, inlcuding number of bytes uploaded and the total number of bytes to be uploaded
var progress = …Run Code Online (Sandbox Code Playgroud)