title: React native compress a video file
body: <p>I'm recording a video using <a href="https://github.com/lwansbrough/react-native-camera" rel="nofollow noreferrer">react-native-camera</a> after stop the recording I want to compress the video and upload to a server. I'm using <a href="https://github.com/mockingbot/react-native-zip-archive" rel="nofollow noreferrer">react-native-zip-archive</a> but the compressed file I get is always empty. Any idea of how to compress the file properly?</p>
  
  <pre><code>this.camera.capture({mode: Camera.constants.CaptureMode.video})
            .then((data) =&gt; {
          return zip(sourcePath, targetPath)
          .then((path) =&gt; {
              console.log(`zip completed at ${path}`);
              return RNFetchBlob.fetch('POST','https://server/upload', {
                  'Content-Type': 'multipart/form-data',
                  }, [
                      { name : 'video-comperss', filename : 'video-comperss', type:'video/quicktime', data: RNFetchBlob.wrap(path)},
                  ])
                  .then((res) =&gt; {
                      if (res.respInfo.status === 200) {
                          console.log('done');
                      }
                      return RNFS.unlink(targetPath)
                      .then(() =&gt; {
                          console.log('file deleted');
                      });
                  });
              })
          })
          .catch(err =&gt; console.error(err));
  </code></pre>