How to initialize a FormCollection with initial data that contains files? #207
Unanswered
luisoibarra
asked this question in
Q&A
Replies: 1 comment
-
If you use the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I need to be able to store the file information between different form pages, right now I encode the UploadedFile and store it in the default django sessions middleware, then if I go back to this page I deserialize the UploadedFile and pass this information as initial argument in the form collection. With non files fields works, but with files I have an error.
Summary, how to serialize and deserialize files to be able to pass the information to the form collection's initial argument.
Example of the process, the deserialize and serialize functions converts the UploadedFile instance into a serializable dictionary and then that dictionary is converted back to the IploadedFile instance.
Beta Was this translation helpful? Give feedback.
All reactions