Hi,
i'm getting bad request 400 error when i am verifying and uploading the file to get the download url .
i use FirebaseAuthentication.net , FirebaseStorage.net
I use the sample code like this
it get error until downloadurl and can't get the file in firebase storage
wirte rule:
rules_version = '2';
service firebase.storage
{
match /b/{bucket}/o
{
match /{allPaths=**} {
allow read, write:if request.auth!=null;
}
}
this is the code
var authProvider = new FirebaseAuthProvider(new FirebaseConfig("APIKEY"));
FirebaseAuth auth = await authProvider.SignInWithEmailAndPasswordAsync(account.Email, account.PW);
var stream = File.Open(@"C:\sample.jpg", FileMode.Open);
var cancellation = new CancellationTokenSource();
string Bucket = "gs://xxxxxxx.appspot.com/";
var hello= new FirebaseStorage(
Bucket,
new FirebaseStorageOptions
{
AuthTokenAsyncFactory = () => Task.FromResult(auth.FirebaseToken),
ThrowOnCancel = true
}).Child("test").Child("test2").Child("sample.jpg").PutAsync(stream, cancellation.Token);
var downloadurl = await hello;
Hi, i'm getting bad request 400 error when i am verifying and uploading the file to get the download url . i use FirebaseAuthentication.net , FirebaseStorage.net I use the sample code like this
it get error until downloadurl and can't get the file in firebase storage
wirte rule:
this is the code