I have a problem with handling files:
lastModified
, size
, type
etc.My field config is following:
"attachments[].id",
"attachments[].url",
"attachments[].file", <- the original File
I imagine that the problem has probably something to do with deep-cloning the fields at some-point (due to immutability) where the File object is converted to a plain object.
Any opinions whether I should continue building a hack where I store only ids of the files in the fields and the File references mapped to ids somewhere else, or is someone perhaps working with the problem already?
Heh, I stumbled into this when working with building a file upload that allowed multiple files. From what I understood the problem begins on https://github.com/erikras/redux-form/blob/master/src/reducer.js#L29
Files are special and I think you have to add a verification if typeof === 'File' or something. I'm looking into it. My hack so far is to create a unique id for each file (new Date().valueOf() + Math.Random(10000,99999)) save the files in components state and then recovering from state on handleSubmit
Published as v5.2.3
.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Published as
v5.2.3
.