Keep a session alive while a file uploads

File upload and session expires

Hello, I have been testing the file upload component.

I have set the variable in php.ini
upload_max_filesize = 5M

And I have set up a session time of 5 minutes.

I have observed several details in it:

1.- When a file has a size greater than 5 Megabytes and exceeds the 5 minutes of session, this reaches 100% but does not show any message, nor is it attached to the ticket. In other words, the session expires and therefore the file is never uploaded, but does not inform in any way, simply the screen stays static until some action is done and redirects to the login page.

2.- Some types of PDF files do not recognize them as such and displays the message "file type not allowed".

3.- Some very large files at the end and reach 100% does not show any message and does not add it to the ticket.

4.- If I upload a file larger than 5 Megabytes, first I have to wait for it to reach 100% so that it indicates to me that the file size exceeds the maximum. That is to say, it could be configured so that once the file is selected, it validates the size and if it exceeds the maximum that sends a message and does not wait until it reaches 100%.


1.- Keep the connection active during the time you upload a very large file.


2.- If a file is larger than upload_max_filesize = 5M you should not wait for it to reach 100%, otherwise validate before it starts uploading.