react-dropzone-uploader AVI 文件停留在状态 "preparing"

react-dropzone-uploader AVI file stuck on status "preparing"

像这样设置 react-dropzone-uploader:

<Dropzone
  getUploadParams={ getUploadParams }
  onChangeStatus={ handleChangeStatus }
  accept='video/*'
  inputContent={ inputContent }
  styles={{
    dropzoneReject: { borderColor: 'red', backgroundColor: '#DAA' }
    , inputLabel: ( files, extra ) => ( extra.reject ? { color: 'red' } : {} )
  }}
/>

上传 250mb .avi 文件时卡在 "preparing" 状态。建议?

适用于 mp4 文件。

const getUploadParams = meta => ::
  return ::
    url: '/'

此错误刚刚在 2.10.2 中修复。

I just pushed a fix in 2.10.2 that ensures that generatePreview returns a promise that never takes more than 1s to resolve or reject.

This way file types for which onload or onloadedmetadata aren't called don't return promises that hang forever.

1s is still more than enough time to get the metadata for even huge (~5gb files), but isn't so long that it's a huge annoyance for file types that don't support metadata retrieval.

https://github.com/fortana-co/react-dropzone-uploader/issues/44

不好意思花了点时间才搞定,最近工作很忙,直到最近才有时间维护和改进RDU。