in your upload() function you used extension() function to get the file's extension but for some files ( ppt, csv, ) its returns ".tex" so i decided to change extension() function with getClientOriginalExtension() function and now its working fine with all sorts of files formats.
in your upload() function you used extension() function to get the file's extension but for some files ( ppt, csv, ) its returns ".tex" so i decided to change extension() function with getClientOriginalExtension() function and now its working fine with all sorts of files formats.