Now uploads properly to the database and also the public folder.