Problems to pass HttpPostFileBase (Asp .Net MVC) between different views

0

I am currently working with ASP .Net MVC building a registration form to a site.

This form is very extensive and consists of several "steps", I have defined for each step of the registration a method within the controller that returns the corresponding VIEW (something like the employment portals, where a registration form is filled in the one that each step is a different screen, with its following next button, general data, formation, abilities, experience, etc etc).

Inside the view n is captured information that I need in view n + 1, by the same the business rules. For that part at first I used a session variable to pass the model between the different views, through the controller methods. However, as the application is going to be placed on distributed servers (and I understand that with load balancers) it is not an option to use these variables, so I opted to save the data in cookies following the same mechanism.

My problem is the following, in some steps of the process you have to upload files, which I manage with a simple HttpPostedFileBase and until then everything is fine, however I can not save the files in cookies due to the limitation of the size of them , and I already commented that I can not use session variables. I can not think of another way to preserve the information of the uploaded files until you reach the final screen that is when the record is generated in the database.

If someone has a suggestion for an alternative mechanism that they could use, I would appreciate it a lot. I do not look for codes or anything, only the idea in principle, the rest I can google it on my own.

Thank you very much

    
asked by Gabriel Othón 01.03.2018 в 00:35
source

0 answers