converted to ARC, fixed compiler warnings. only send filename info if set in upload