Upload large or compressed files?

Asked

Viewed 106 times

3

I have a problem sending files to the server for large files and an idea was to send some of them in compressed form .zip.

Is there any problem in leaving open the part of upload so the user can send files of this type?

There is some other solution for sending large files that exceed the limit and with this keeps giving time out?

1 answer

3


There is no problem in this type of extension, on the contrary. And if there were also, you would be doing something very wrong in your script.

To allow sending of larger files you can change the file php.ini. Look for:

; Maximum allowed size for uploaded files.
upload_max_filesize = 32M

; Must be greater than or equal to upload_max_filesize
post_max_size = 32M

If the problem is time, change:

max_execution_time = 60
max_input_time = 60

You may need to increase it further. It’s good not to increase it too much. And then treat the problem, probably using the function register_shutdown_function().

Documentation.

  • I had this doubt more to see that some places are not allowed to upload this type of file, but since there are no problems I will do this test. And as for the php.ini changes I’ve already made but still continues.

  • 1

    It’s more domestic politics. What matters is what’s inside. What happens is that Els can use some anti-virus and the compressed file can prevent av checking. Although everyone I know can see inside zip. I improved the answer.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.