generalized the file sending part of the base appier