I try to redrive metadata from the firebase storage using http get request, but the problem is that i just receive the filename and the bucket. i using this information for my desktop application which is build on the .net.
public async Task<JArray> ListFilesForUserAsync(string userFolder)
{
string encodedFolderPath = Uri.EscapeDataString($"{userFolder}/");
string requestUrl = $"{storageBaseUrl}?prefix={encodedFolderPath}";
try
{
HttpResponseMessage response = await httpClient.GetAsync(requestUrl);
if (response.IsSuccessStatusCode)
{
string responseBody = await response.Content.ReadAsStringAsync();
var jsonResponse = JObject.Parse(responseBody);
var item = (JArray)jsonResponse["items"];
// GetFileMetadataAsync(userFolder);
return item;
}
else
{
Console.WriteLine($"Error listing files: {response.ReasonPhrase}");
return null;
}
}
catch (Exception ex)
{
Console.WriteLine($"Exception occurred: {ex.Message}");
return null;
}
}
i want also to receive more information for each file such as the size, name, last modified.
can someone help me to resolve this problem?