Actually i fixed it like this, in case anyone else has the same problem:
It can occur when uploading a file that is too large on an Apache web server with mod_fcgid enabled. The solution is to set MaxRequestLen to a larger value.
Just add this to /etc/apache2/mods-available/fcgid.conf
—
# to get around upload errors when uploading images increase the MaxRequestLen size to 15MB