[#67266474] Detect the file format with 'pathinfo' function