Here is the process of my form:
Step 1: User uploads a CSV. System parses it and accepts some records, denies some others.
Step 2: User can see how many were accepted and how many were not as a confirmation. User has a choice of processing with only successful records from CSV or cancel the process all together (via a cancel button or just going back to home page).
Now, what is the best way for me to “hold” this CSV data into step 2 and beyond (if they want to keep going)? I am thinking about storing all records into the database from step 1, but that will cause a lot of unnecessary DB activity and possibly making the database too large with left over records. I am also thinking about leaving the file on the server to be picked up again with only the successful records if they choose to proceed on step 2, but then I’d have to clean up a bunch of all files all the time (ex. if they just close the browser at step 2). Thirdly, storing in a session would make the session too large.
Thanks in advance!
I see 3 potential options:
I’m not sure how much data you’re passing, but if it’s too big to hold it in sessions, and too big to pass it through the url, then db seems like your best solution. Db calls are generally not going to make or break your site as far as performance goes.