Skip to content

Commit be85ba8

Browse files
authored
Merge pull request #185 from numandev1/fix/getRealPath-type
fix: get real path type
2 parents 530e59a + 6ac2111 commit be85ba8

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

example/ios/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -881,7 +881,7 @@ PODS:
881881
- React-Codegen
882882
- React-RCTFabric
883883
- ReactCommon/turbomodule/core
884-
- react-native-compressor (1.8.2):
884+
- react-native-compressor (1.8.3):
885885
- hermes-engine
886886
- NextLevelSessionExporter
887887
- RCT-Folly (= 2021.07.22.00)
@@ -1381,7 +1381,7 @@ SPEC CHECKSUMS:
13811381
React-jsinspector: aaed4cf551c4a1c98092436518c2d267b13a673f
13821382
React-logger: da1ebe05ae06eb6db4b162202faeafac4b435e77
13831383
react-native-cameraroll: 5d9523136a929b58f092fd7f0a9a13367a4b46e3
1384-
react-native-compressor: 5ade6acb23c816132fe941fe08b8632eb369e354
1384+
react-native-compressor: da13fadee6d77eb4a769df6079f179fe0c72047e
13851385
react-native-document-picker: c9ac93d7b511413f4a0ed61c92ff6c7b1bcf4f94
13861386
react-native-get-random-values: dee677497c6a740b71e5612e8dbd83e7539ed5bb
13871387
react-native-image-picker: 9b4b1d0096500050cbdabf8f4fd00b771065d983

src/utils/index.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ type createVideoThumbnailType = (
4545

4646
type clearCacheType = (cacheDir?: string) => Promise<string>;
4747
type getVideoMetaDataType = (filePath: string) => Promise<string>;
48+
type getRealPathType = (
49+
path: string,
50+
type: 'video' | 'imaage'
51+
) => Promise<string>;
4852

4953
export const generateFilePath: any = (extension: string) => {
5054
return new Promise((resolve, reject) => {
@@ -54,10 +58,7 @@ export const generateFilePath: any = (extension: string) => {
5458
});
5559
};
5660

57-
export const getRealPath: any = (
58-
path: string,
59-
type: 'video' | 'imaage' = 'video'
60-
) => {
61+
export const getRealPath: getRealPathType = (path, type = 'video') => {
6162
return Compressor.getRealPath(path, type);
6263
};
6364

0 commit comments

Comments
 (0)