I have a UI which will receive a file from the user/the user uploads a file which is stored in firebase storage. How to test this in emulator? Which storage bucket should I give? The real storage bucket or emulator bucket?
            Asked
            
        
        
            Active
            
        
            Viewed 1,148 times
        
    1
            
            
        - 
                    You just upload file from postman. you can take reference from this [answer](https://stackoverflow.com/a/39037889/10182897) – Ashish Feb 07 '22 at 10:32
- 
                    Why do I have to use postman? I want to see if the files are getting added in firebase storage without deploying. – Nvv Feb 07 '22 at 10:42
- 
                    to send the request to specific function – Ashish Feb 07 '22 at 10:44
1 Answers
1
            
            
        To test your Cloud Functions code for uploading a file to a bucket in Cloud Storage using Emulator you need to use the bucket name of Storage Emulator. By default the emulator suite will have a bucket named project-id.appspot.com, which is also the name of the default bucket for production Firebase Storage.
I found this link on Using Firebase Emulator for Testing File Upload to Firebase Storage Using Firebase Functions, that contains a video demonstrating the whole process of using Emulator, which I think is really useful.
 
    
    
        Zeenath S N
        
- 1,100
- 2
- 8
