Detect file type

Update function show_fileurl