The file could not be uploaded

Actually this error come because of wrongly setting the image storage in content type (in my case wrongly setting image storage on imge file on book content type to Public -- it should be Private) as private file setting in setting.php is Private.

So, goo to content type and click image - edit the image storage to Private