add write and upload