Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/views/AttachmentView.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ class AttachmentView extends React.Component {
this.setState({ loading: true });
try {
const extension = image_url ? `.${ mime.extension(image_type) || 'jpg' }` : `.${ mime.extension(video_type) || 'mp4' }`;
const path = `${ RNFetchBlob.fs.dirs.DocumentDir + SHA256(url) + extension }`;
const documentDir = `${ RNFetchBlob.fs.dirs.DocumentDir }/`;
const path = `${ documentDir + SHA256(url) + extension }`;
const file = await RNFetchBlob.config({ path }).fetch('GET', mediaAttachment).then(res => res.path());
await CameraRoll.save(file, { album: 'Rocket.Chat' });
EventEmitter.emit(LISTENER, { message: I18n.t('saved_to_gallery') });
Expand Down
4 changes: 2 additions & 2 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ PODS:
- React
- react-native-blur (0.8.0):
- React
- react-native-cameraroll (4.0.0):
- react-native-cameraroll (4.0.1):
- React
- react-native-cookies (4.0.0):
- React
Expand Down Expand Up @@ -939,7 +939,7 @@ SPEC CHECKSUMS:
react-native-appearance: 0f0e5fc2fcef70e03d48c8fe6b00b9158c2ba8aa
react-native-background-timer: 1f7d560647b40e6a60b01c452ba29c54bf581fc4
react-native-blur: cad4d93b364f91e7b7931b3fa935455487e5c33c
react-native-cameraroll: ae0a7c0cc8462508855707ff623b1e789b692865
react-native-cameraroll: 60ba0068826eab1c8d43146191bafd4363ea58a7
react-native-cookies: d79e5015a5d3a38e08f5cb39c4948532be7e9c2b
react-native-document-picker: 825552b827012282baf4b7cbf119d3b37a280c90
react-native-jitsi-meet: f2407aca85566e031ee7b222e497ee5ecb6623de
Expand Down
4 changes: 2 additions & 2 deletions ios/Pods/Local Podspecs/react-native-cameraroll.podspec.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions ios/Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@react-native-community/art": "^1.2.0",
"@react-native-community/async-storage": "1.11.0",
"@react-native-community/blur": "^3.6.0",
"@react-native-community/cameraroll": "4.0.0",
"@react-native-community/cameraroll": "^4.0.1",
"@react-native-community/cookies": "^4.0.0",
"@react-native-community/datetimepicker": "2.6.0",
"@react-native-community/hooks": "2.6.0",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1967,10 +1967,10 @@
dependencies:
prop-types "^15.5.10"

"@react-native-community/cameraroll@4.0.0":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@react-native-community/cameraroll/-/cameraroll-4.0.0.tgz#97a4be5d01bc05c387c26599ffa559e1b425e415"
integrity sha512-ZqzWbNHklgq/sPUmlDgi/SvfbkIVKNYXhcDGRcabXRsX9aIyNEX2dk2fkCSJoKWqBF8uSUnVznonpTP3TlwdyQ==
"@react-native-community/cameraroll@^4.0.1":
version "4.0.1"
resolved "https://registry.yarnpkg.com/@react-native-community/cameraroll/-/cameraroll-4.0.1.tgz#8466f99a476e6b833ecd5efff045f74a4224459b"
integrity sha512-KLKh5rAg511KUoGKHrbRhBLvkHhOz6kZ2sx8dPhndZ5ZFVYfVpTadSN1x3cfQbOAlkyGZql07p1hk7lEb3sa8g==

"@react-native-community/cli-debugger-ui@^4.13.1":
version "4.13.1"
Expand Down