fixed usage of upload method