change upload_mem syntax