The upload function is now working properly