test the upload method