Skip to content

Commit

Permalink
fix: download issue on desktop & native devices.
Browse files Browse the repository at this point in the history
Signed-off-by: Krishna Gupta <[email protected]>
  • Loading branch information
Krishna2323 committed Feb 24, 2024
1 parent 683cff8 commit 4e68e2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/VideoPlayerContexts/VideoPopoverMenuContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand All @@ -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]);
Expand Down

0 comments on commit 4e68e2f

Please sign in to comment.