Merge branch 'main' of https://git.crystalyx.net/GameJams/Snaparazzi
This commit is contained in:
commit
a8b7ae964c
@ -42,7 +42,9 @@ public void UploadPhoto(string roomCode, string playerId, int question, int prop
|
|||||||
byte[] photoBytes = ImageConversion.EncodeToJPG(photo);
|
byte[] photoBytes = ImageConversion.EncodeToJPG(photo);
|
||||||
string imageUuid = Guid.NewGuid().ToString();
|
string imageUuid = Guid.NewGuid().ToString();
|
||||||
|
|
||||||
StorageReference imageRef = storage.Child($"gs://ggj2024-5cb41.appspot.com/{roomCode}/{playerId}/{imageUuid}.png");
|
string root = "gs://ggj2024-5cb41.appspot.com/";
|
||||||
|
string path = $"{roomCode}/{playerId}/{imageUuid}.png";
|
||||||
|
StorageReference imageRef = storage.Child(path);
|
||||||
|
|
||||||
imageRef.PutBytesAsync(photoBytes).ContinueWith((Task<StorageMetadata> task) =>
|
imageRef.PutBytesAsync(photoBytes).ContinueWith((Task<StorageMetadata> task) =>
|
||||||
{
|
{
|
||||||
@ -61,7 +63,7 @@ public void UploadPhoto(string roomCode, string playerId, int question, int prop
|
|||||||
.Child("propositions")
|
.Child("propositions")
|
||||||
.Child(proposition.ToString())
|
.Child(proposition.ToString())
|
||||||
.Child("photoUrl")
|
.Child("photoUrl")
|
||||||
.SetValueAsync(imageRef.Path);
|
.SetValueAsync(root + path);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user