From 4e68e2f995f75b56f917c579bd28841a1a25267e Mon Sep 17 00:00:00 2001 From: Krishna Gupta Date: Sun, 25 Feb 2024 02:37:22 +0530 Subject: [PATCH] fix: download issue on desktop & native devices. Signed-off-by: Krishna Gupta --- src/components/VideoPlayerContexts/VideoPopoverMenuContext.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/VideoPlayerContexts/VideoPopoverMenuContext.js b/src/components/VideoPlayerContexts/VideoPopoverMenuContext.js index 801c1b2f44ca..ed502136716f 100644 --- a/src/components/VideoPlayerContexts/VideoPopoverMenuContext.js +++ b/src/components/VideoPlayerContexts/VideoPopoverMenuContext.js @@ -5,7 +5,7 @@ import * as Expensicons from '@components/Icon/Expensicons'; import useLocalize from '@hooks/useLocalize'; import useNetwork from '@hooks/useNetwork'; import fileDownload from '@libs/fileDownload'; -import * as Url from '@libs/Url'; +import tryResolveUrlFromApiRoot from '@libs/tryResolveUrlFromApiRoot'; import CONST from '@src/CONST'; import {usePlaybackContext} from './PlaybackContext'; @@ -27,7 +27,7 @@ function VideoPopoverMenuContextProvider({children}) { const downloadAttachment = useCallback(() => { currentVideoPlayerRef.current.getStatusAsync().then((status) => { - const sourceURI = `/${Url.getPathFromURL(status.uri)}`; + const sourceURI = tryResolveUrlFromApiRoot(status.uri); fileDownload(sourceURI); }); }, [currentVideoPlayerRef]);