title: Flutter web - Uploading image to firebase storage
body: <p>I am using the <code>firebase_storage: ^8.0.6</code> package on flutter web. I want to upload image to firebase storage that I get using <code>FilePicker</code> package.
  The problem is that the new package uses the putFile() method to upload files. But File from dart:io doesn't work on flutter web and it also doesn't accept the File object from dart:html.</p>
  <p>I can upload image as Blob using the putBlob() method but then it doesn't upload it as image type but it's type is <code>application/octet-stream</code>. I don't want to upload the image file as a blob.</p>
  <pre><code>  Future&lt;String&gt; uploadImage(PlatformFile file) async {
      try {
  
        TaskSnapshot upload = await FirebaseStorage.instance
            .ref(
                'events/${file.name}-${DateTime.now().toIso8601String()}.${file.extension}')
            .putBlob(Blob(file.bytes));
  
        String url = await upload.ref.getDownloadURL();
        
        return url;
      } catch (e) {
        print('error in uploading image for : ${e.toString()}');
        return ';
      }
    } 
  </code></pre>
  <p>How to fix this issue?</p>