You may have encountered an error while uploading images or files to your WordPress blog. The message you typically get is “An error occurred in the upload. Please try again later.” And you swear that you did not make any configuration changes to your WordPress blog nor upgraded it recently. So what could be the caused of this problem/error?
Apparently, this is due to the Attracta script that was loaded into your public_html folder in your web hosting account by your hosting company. Because of this script, it messed up the upload process. The fastest and immediate fix is to rename the file to another name or delete the script. You can do it by doing a FTP/Secure FTP session into the directory using your favourite FTP client, or use the Control Panel of the hosting provider to rename or delete the file. Now, your file upload would be back to normal again!
In case you are curious, the source of the script looks like this:
<!-- Begin Attracta Include 2013-XX-XX XX:XX -->
<script type='text/javascript'> function attracta_loadjs(url) { (function() { var s = document.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = url; var x = document.getElementsByTagName('script')[0]; x.parentNode.insertBefore(s, x); })(); } function attracta_shouldrun() { var v = ["/admin/","/adm/","/wp-admin/","/administrator/"]; for (x in v) if(window.location.pathname.indexOf(v[x]) == 0) return false; return true; } function attracta_window_width() { if (document.body && document.body.offsetWidth) return document.body.offsetWidth; if (document.compatMode=='CSS1Compat' && document.documentElement && document.documentElement.offsetWidth ) return document.documentElement.offsetWidth; if (window.innerWidth) return window.innerWidth; return 0; } function attracta_window_height() { if (document.body && document.body.offsetHeight) return document.body.offsetHeight; if (document.compatMode=='CSS1Compat' && document.documentElement && document.documentElement.offsetHeight ) return document.documentElement.offsetHeight; if (window.innerHeight) return window.innerHeight; return 0; } </script>