set file limit to 2mb and refactoring code for get_file in view