If you are trying to install a Joomla extension from your Extension Manager and receiveing this error message:
"There was an error uploading this file to the server"
then the reason for this error message is a php configuration error on your server. The file size limit is set low, and thats why when you upload anything bigger than that, this error message shows up.
Some server provider set the file size limit to just 2MB by default. So, when you try to install any Joomla Extension whose file size is bigger than 2MB, it will throw this error.
The solution is to increase the file size limit to a higer value. You can do this by adding this below lines of code to your php.ini or asking your server admin to add it to your server main php.ini file , and then upload this php.ini into your Joomla root directory and the "/administrator" subdirectory. It will set the limit to 32MB.
upload_max_filesize = 32M
post_max_size = 32M