diff --git a/src/components/molecules/FormFields/FilesInput/index.tsx b/src/components/molecules/FormFields/FilesInput/index.tsx index 555a451cd..cb0a7259a 100644 --- a/src/components/molecules/FormFields/FilesInput/index.tsx +++ b/src/components/molecules/FormFields/FilesInput/index.tsx @@ -23,7 +23,7 @@ export default function FilesInput(props: InputProps): ReactElement { const newFileInfo = await getFileInfo(url) newFileInfo && helpers.setValue([newFileInfo]) } catch (error) { - toast.error('Could not fetch file info. Please check url and try again') + toast.error('Could not fetch file info. Please check URL and try again') console.error(error.message) } finally { setIsLoading(false) diff --git a/src/utils/index.ts b/src/utils/index.ts index 895efb71f..54d19526b 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -50,7 +50,7 @@ export async function getFileInfo(url: string): Promise { data: { url } }) - if (response.status > 299 || !response.data.result) { + if (response.status > 299 || !response.data) { toast.error('Could not connect to File API') return }