Search code examples
phphtmlinput

How to upload apk files to input file in HTML/PHP


When I upload any apk files that are bigger than 16MB to <input type=‘file’>(within <form action=“” method=“post”> ) and hit the submit button the web just load for some bit then refreshes the page and resets every datas that are put into the other inputs earlier as if nothing happened. Or we can say this in another way, how can I make the form to be able to transfer big sized files such as apks.

I have searched in google, youtube and found nothing related to that problem.


Solution

  • Possible issues such as incorrect form setup, missing enctype="multipart/form-data", or problems within your PHP code could be the culprit. If all your HTML and PHP code seems correct but you still encounter upload limitations, two factors to consider are upload_max_filesize and post_max_size. These limitations are set in your server's php.ini file, and if you're facing issues, increasing their values might resolve your problem. Typically, errors are displayed for this issue. You can refer to this page for further reading on configuring file upload settings in PHP.