mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-23 15:06:50 +08:00
feat: add corresponding icons to files (#164)
This commit is contained in:
@ -38,3 +38,7 @@ export const isFileUploadDone = (file: UploadFile) => file.status === 'done';
|
||||
|
||||
export const getExtension = (name: string) =>
|
||||
name?.slice(name.lastIndexOf('.') + 1).toLowerCase() ?? '';
|
||||
|
||||
export const isPdf = (name: string) => {
|
||||
return getExtension(name) === 'pdf';
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user