refactor 'create docs with image attachments' for android