第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

如何在 .Net C# Windows 窗體中將文件上傳到 Firebase 存儲?

如何在 .Net C# Windows 窗體中將文件上傳到 Firebase 存儲?

C#
蕪湖不蕪 2022-08-20 16:19:54
我嘗試了以下功能將圖像上傳到Firebase存儲 private async void UploadFiles()    {        var stream = File.Open(@"D:\\Capture.png", FileMode.Open);        var auth = new FirebaseAuthProvider(new FirebaseConfig(ApiKey));        var a = await auth.SignInWithEmailAndPasswordAsync(AuthEmail, AuthPassword);        var cancellation = new CancellationTokenSource();        var task = new FirebaseStorage(            Bucket,            new FirebaseStorageOptions            {                AuthTokenAsyncFactory = () => Task.FromResult(a.FirebaseToken),                ThrowOnCancel = true // when you cancel the upload, exception is thrown. By default no exception is thrown            })            .Child("receipts")           // .Child("test")            .Child("Capture.png")            .PutAsync(stream, cancellation.Token);        task.Progress.ProgressChanged += (s, e) => textBox1 .Text =($"Progress: {e.Percentage} %");        // cancel the upload        // cancellation.Cancel();        try        {            // error during upload will be thrown when you await the task          textBox1 .Text =("Download link:\n" + await task);        }        catch (Exception ex)        {            MessageBox .Show( ex.Message);        }    }給我這個錯誤:處理請求時發(fā)生異常。Url: https://firebasestorage.googleapis.com/v0/b/gs://testingsupport-44f0b.appspot.com//o?name=receipts%2FCapture.png 響應(yīng): { “error”: { “code”: 400, “message”: “Invalid HTTP method/URL pair.” } }
查看完整描述

1 回答

?
白衣染霜花

TA貢獻1796條經(jīng)驗 獲得超10個贊

您必須編輯變量。而不是使用它應(yīng)該只是Bucketgs://xxxxx.appspot.com/xxxxx.appspot.com



查看完整回答
反對 回復(fù) 2022-08-20
  • 1 回答
  • 0 關(guān)注
  • 88 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號