Added context to upload callback function