diff --git a/android/app/build.gradle b/android/app/build.gradle
index 99d7a186e7ee..8249787d40a1 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -98,8 +98,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
- versionCode 1001044318
- versionName "1.4.43-18"
+ versionCode 1001044319
+ versionName "1.4.43-19"
}
flavorDimensions "default"
diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist
index 574657c8c3f4..ca10ef60e27a 100644
--- a/ios/NewExpensify/Info.plist
+++ b/ios/NewExpensify/Info.plist
@@ -40,7 +40,7 @@
CFBundleVersion
- 1.4.43.18
+ 1.4.43.19
ITSAppUsesNonExemptEncryption
LSApplicationQueriesSchemes
diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist
index e4962c94df8d..3c7c47000bfa 100644
--- a/ios/NewExpensifyTests/Info.plist
+++ b/ios/NewExpensifyTests/Info.plist
@@ -19,6 +19,6 @@
CFBundleSignature
????
CFBundleVersion
- 1.4.43.18
+ 1.4.43.19
diff --git a/ios/NotificationServiceExtension/Info.plist b/ios/NotificationServiceExtension/Info.plist
index 308c4314ee68..2af07b452f70 100644
--- a/ios/NotificationServiceExtension/Info.plist
+++ b/ios/NotificationServiceExtension/Info.plist
@@ -13,7 +13,7 @@
CFBundleShortVersionString
1.4.43
CFBundleVersion
- 1.4.43.18
+ 1.4.43.19
NSExtension
NSExtensionPointIdentifier
diff --git a/package-lock.json b/package-lock.json
index 31579258dc65..14adc15f9877 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "new.expensify",
- "version": "1.4.43-18",
+ "version": "1.4.43-19",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "new.expensify",
- "version": "1.4.43-18",
+ "version": "1.4.43-19",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
diff --git a/package.json b/package.json
index 6338dd5c4430..ee32dfcc774b 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "new.expensify",
- "version": "1.4.43-18",
+ "version": "1.4.43-19",
"author": "Expensify, Inc.",
"homepage": "https://new.expensify.com",
"description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",
diff --git a/src/components/VideoPlayerContexts/VideoPopoverMenuContext.js b/src/components/VideoPlayerContexts/VideoPopoverMenuContext.js
index 23d1aec1817c..7bd8ff18bd74 100644
--- a/src/components/VideoPlayerContexts/VideoPopoverMenuContext.js
+++ b/src/components/VideoPlayerContexts/VideoPopoverMenuContext.js
@@ -3,15 +3,15 @@ import React, {useCallback, useContext, useMemo, useState} from 'react';
import _ from 'underscore';
import * as Expensicons from '@components/Icon/Expensicons';
import useLocalize from '@hooks/useLocalize';
+import addEncryptedAuthTokenToURL from '@libs/addEncryptedAuthTokenToURL';
import fileDownload from '@libs/fileDownload';
-import * as Url from '@libs/Url';
import CONST from '@src/CONST';
import {usePlaybackContext} from './PlaybackContext';
const VideoPopoverMenuContext = React.createContext(null);
function VideoPopoverMenuContextProvider({children}) {
- const {currentVideoPlayerRef} = usePlaybackContext();
+ const {currentVideoPlayerRef, currentlyPlayingURL} = usePlaybackContext();
const {translate} = useLocalize();
const [currentPlaybackSpeed, setCurrentPlaybackSpeed] = useState(CONST.VIDEO_PLAYER.PLAYBACK_SPEEDS[2]);
@@ -24,11 +24,9 @@ function VideoPopoverMenuContextProvider({children}) {
);
const downloadAttachment = useCallback(() => {
- currentVideoPlayerRef.current.getStatusAsync().then((status) => {
- const sourceURI = `/${Url.getPathFromURL(status.uri)}`;
- fileDownload(sourceURI);
- });
- }, [currentVideoPlayerRef]);
+ const sourceURI = currentlyPlayingURL.startsWith('blob:') || currentlyPlayingURL.startsWith('file:') ? currentlyPlayingURL : addEncryptedAuthTokenToURL(currentlyPlayingURL);
+ fileDownload(sourceURI);
+ }, [currentlyPlayingURL]);
const menuItems = useMemo(
() => [
diff --git a/src/libs/fileDownload/FileUtils.ts b/src/libs/fileDownload/FileUtils.ts
index 055abf140e64..70ab01f62466 100644
--- a/src/libs/fileDownload/FileUtils.ts
+++ b/src/libs/fileDownload/FileUtils.ts
@@ -80,14 +80,14 @@ function showCameraPermissionsAlert() {
* Extracts a filename from a given URL and sanitizes it for file system usage.
*
* This function takes a URL as input and performs the following operations:
- * 1. Extracts the last segment of the URL, which could be a file name, a path segment,
- * or a query string parameter.
+ * 1. Extracts the last segment of the URL.
* 2. Decodes the extracted segment from URL encoding to a plain string for better readability.
* 3. Replaces any characters in the decoded string that are illegal in file names
* with underscores.
*/
function getFileName(url: string): string {
- const fileName = url.split(/[#?/]/).pop() ?? '';
+ const fileName = url.split('/').pop()?.split('?')[0].split('#')[0] ?? '';
+
if (!fileName) {
Log.warn('[FileUtils] Could not get attachment name', {url});
}
@@ -111,7 +111,7 @@ function getFileType(fileUrl: string): string | undefined {
return;
}
- const fileName = fileUrl.split('/').pop()?.split('?')[0].split('#')[0];
+ const fileName = getFileName(fileUrl);
if (!fileName) {
return;