Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
429 views
in Technique[技术] by (71.8m points)

firebase - Flutter和Firebase存储错误:文件未上传到Firebase(Flutter and firebase storage error : file not uploading to firebase)

I am working on an app in flutter and I am trying to upload some files to firebase.

(我正在处理一个扑扑的应用程序,并且试图将一些文件上传到Firebase。)

It was working fine but now it does not seem to work and I can't upload files to firebase storage.

(它工作正常,但现在似乎不起作用,我无法将文件上传到Firebase存储。)

I tried to catch the error and I got error on task complete : -13021 This is the code for uploading :

(我试图捕获该错误,但在完成任务时遇到了错误:-13021这是用于上传的代码:)

    StorageReference storageReference = FirebaseStorage.instance
        .ref()
        .child('documents')
        .child(uuid)
        .child(uuid2 + "." + orderDetails["type"]);
    var data = await file.readAsBytes();

    StorageUploadTask uploadTask = storageReference.putData(data);
    await uploadTask.onComplete;

The firebase database is working fine only the storage is not working;

(Firebase数据库可以正常工作,只有存储无法正常工作;)

  ask by m.n translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...