2

我正在跟踪一些将要上传到 S3 的文件。

我添加了 redux persist 以保持 redux 状态,即使在刷新后也是如此。

为什么刷新后文件对象的某些值会被删除?

redux 中的原始对象(实际上是更大对象的一部分... [{person:{}, files:[file:{}]}] )如下所示:

{
  file: {
    name:"test.png"
    preview:"blob:http://localhost:8080/..."
    size:39545
    type:"image/png"
  }, 
  progress: 100, 
  uploader: S3Upload, 
  completed: true, 
  url: "...test.png"
}

刷新后对象如下所示:

{
  file: {
    preview:"blob:http://localhost:8080/..."
  }, 
  progress: 100, 
  uploader: {…}, 
  completed: true, 
  url: "...test.png"
}

为什么第二个文件对象中不存在名称、大小和类型?

4

0 回答 0