uploads image file to a path