diff --git a/src/renderer/components/BaseUploadInput.vue b/src/renderer/components/BaseUploadInput.vue
index 5b421f80..b2076b72 100644
--- a/src/renderer/components/BaseUploadInput.vue
+++ b/src/renderer/components/BaseUploadInput.vue
@@ -4,7 +4,7 @@
{{ message }}
- {{ lastPart(modelValue) }}
+ {{ lastPart(modelValue, 19) }}
import { uidGen } from 'common/libs/uidGen';
+import { useFilters } from '@/composables/useFilters';
+
+const { lastPart } = useFilters();
defineProps({
message: {
@@ -43,15 +46,6 @@ const id = uidGen();
const clear = () => {
emit('clear');
};
-
-const lastPart = (string: string) => {
- if (!string) return '';
-
- string = string.split(/[/\\]+/).pop();
- if (string.length >= 19)
- string = `...${string.slice(-19)}`;
- return string;
-};