Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

200
Visualizações
Unity firebase storage

i am creating a function that loads my file from local disk and uploading it onto the firebase cloud storage. The function is able to find the file in the local disk but it shows an error firebase.storage.storageexception: could not read file . Here is my code

    public void StartUpload()
    {
        StartCoroutine(Upload());
    }

    private IEnumerator Upload()
    {
        var storage = FirebaseStorage.DefaultInstance;
        var audioreference = storage.GetReference("gs://snack-stack.appspot.com");
        string local_file = "file:///" + Application.persistentDataPath + "/" + "UnityTest" + "/" + "lmao.png";
        var uploadTask = audioreference.PutFileAsync(local_file);
        yield return new WaitUntil(() => uploadTask.IsCompleted);

        if (uploadTask.Exception != null)
        {
            Debug.LogError($"Failed to upload because {uploadTask.Exception}");
            yield break;
        }

        var getUrltask = audioreference.GetDownloadUrlAsync();
        yield return new WaitUntil(() => getUrltask.IsCompleted);

        if (getUrltask.Exception != null)
        {
            Debug.LogError($"Failed to get a download url with {getUrltask.Exception}");
            yield break;
        }

        Debug.Log($"Downloaded from {getUrltask.Result}");
over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda