diff --git a/resources/scripts/components/server/files/PullFileModal.tsx b/resources/scripts/components/server/files/PullFileModal.tsx
index ecb4667d6..4dbee41fd 100644
--- a/resources/scripts/components/server/files/PullFileModal.tsx
+++ b/resources/scripts/components/server/files/PullFileModal.tsx
@@ -33,6 +33,14 @@ const generateFileData = (name: string): FileObject => ({
isEditable: () => false,
});
+const parseURL = (url: string): string => {
+ try {
+ return new URL(url).pathname.split('/').pop() || '';
+ } catch (e) {
+ return '';
+ }
+};
+
export default ({ className }: WithClassname) => {
const [ visible, setVisible ] = useState(false);
@@ -53,7 +61,7 @@ export default ({ className }: WithClassname) => {
const submit = ({ url }: Values, { setSubmitting }: FormikHelpers