.then(res => res.blob()) // Gets the response and returns it as a blob
                  
                  
                          .then(blob => {
                  
                  
                            // Here's where you get access to the blob
                  
                  
                            // And you can use it for whatever you want
                  
                  
                            // Like calling ref().put(blob)
                  
                  
                  
                  
                  
                            // Here, I use it to make an image appear on the page
                  
                  
                            console.log(URL.createObjectURL(blob))
                  
                  
                          })
                  
                  
                  
                  
                  
                  Но но неработает без cors заголовков.
                  
                  
                  
                  
                  
                  Может есть другой вариант? подскажите плиз
                  
                  
                
а почему не добавить cors?
Обсуждают сегодня