What kind of error? Just an error that something went wrong? Or is it a little bit more specific (like the filename is too long or the file size is too big).
An error that something just went wrong happens if your connection isn't stable or if all your upload bandwidth is gone (e.g. if you upload something big in parallel or use any p2p programs).