This issue can be caused by a number of things but is rarely theme-related. It is often due to an issue with web hosting such as running out of storage space, temporary upload space or with file permissions but it may also be caused by a plugin or child theme. We recommend trying these things.
1. Try deactivating all plugins then go to Media and try uploading a file. If the problem goes away while all plugins are inactive, then reactivate them one by one to determine which is causing the problem.
2. If the issue continues, try activating one of the default themes (such as Twenty Fifteen) and uploading via the Media menu. If the error still continues, then this is a clue that the issue is not plugin or theme-related.
3. Contact your web host and paste the error, asking if they are aware of the reason for this issue with WordPress on their server.
4. If your host is not able to help, search the WordPress Support Forum for solutions or make a post describing your specific issue.