0

i am developing flutter app and i need to send Thumbnail from a video to firebase storage

i am trying to do somthing like this

Uint8List VideoThumbnail ;
  onPressed: () async {
        final result  = await  FilePicker.platform.pickFiles(allowMultiple: false,  );
        final path = result.files.single.path;
        setState(() => file = File(path));
      if (file == null) {
        return;
      }
    
        final img = await VideoCompress.getByteThumbnail(file.path) ;


      //  setState(() => this.VideoThumbnail = img );

      
      if (file == null) return;
     final fileName = basename(file.path);
     final destination = 'files/$fileName';
     task = FirebaseApi.uploadFile( destination,file); // here wont accept VideoThumbnail variable
     setState(() {});
Jack
  • 161
  • 1
  • 16
  • you need to pass a photo file to storage not bytes or something. It should be File I think – Muhtar Jul 05 '21 at 05:53
  • You can upload an image to firebase storage. To know how [visit here](https://stackoverflow.com/questions/40581930/how-to-upload-an-image-to-firebase-storage) – anirudh Jul 05 '21 at 05:55
  • i already perfectly uploading videos , images , point is how to send Thumbnail data to storage , if it not support bytes so i think the only way to do it is saving the generated Thumbnail in phone storage then upload it to storage as a normal file type which is already support , but have u an idea how to save Thumbnail from the video to a phone storage ? – Jack Jul 05 '21 at 06:47

0 Answers0