1

I am making a website for uploading large video files using PHP. But the problem is that i get (ERR_CONNECTION_RESET) error while uploading large files which take more time to upload. It works fine for small files (less than 80-90mb) which take less time to upload. I have added these lines to my user.ini file but still nothing.

max_execution_time = 600
max_input_time = 600
memory_limit = 1024M
post_max_size = 1024M
upload_max_filesize = 1024M

Is there a way to break large files into smaller pieces which can be uploaded without this timeout error or is there any other better way for uploading large files.

Hamza.am.i
  • 123
  • 1
  • 10

1 Answers1

1

you can use split command in Linux

https://linux.die.net/man/1/split

Stoian Ivanov
  • 107
  • 1
  • 3
  • Looking in your question past the question line .. you're actually receiving this files on the sever via php. I'm not aware of truly "portable" frontend way of splitting files to smaller chunks for upload. I can imagine upload files over websocket but this requires that javascript being able to "read" file from the client machine something that is not generally allowed. – Stoian Ivanov Oct 12 '17 at 05:08
  • OK! here is something to start reading if you're going "client way" https://w3c.github.io/FileAPI Other solution: run SFTP server over which the upload happens. Offer PHP file selection interface from the SFTP uploaded files – Stoian Ivanov Oct 12 '17 at 05:19