Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

199
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!