Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Let cozy-clisk convert dataUri to arrayBuffer itself #895

Merged
merged 1 commit into from
Aug 4, 2023
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"@sentry/react-native": "3.4.3",
"base-64": "^1.0.0",
"cozy-client": "^40.0.1",
"cozy-clisk": "^0.20.3",
"cozy-clisk": "^0.22.1",
"cozy-device-helper": "^2.7.0",
"cozy-flags": "^2.11.0",
"cozy-intent": "^2.14.0",
Expand Down
15 changes: 5 additions & 10 deletions src/libs/Launcher.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// @ts-check
/* eslint-disable no-unused-vars */
import Minilog from 'cozy-minilog'

import { getBuildId, getVersion } from 'react-native-device-info'

// @ts-ignore
Expand All @@ -17,7 +18,6 @@ import {
removeCredential,
getSlugAccountIds
} from './keychain'
import { dataURItoArrayBuffer } from './utils'

import { constants } from '/screens/konnectors/constants/konnectors-constants'

Expand Down Expand Up @@ -458,16 +458,11 @@ export default class Launcher {
sourceAccount: job.message.account,
sourceAccountIdentifier,
// @ts-ignore
downloadAndFormatFile: async entry => {
downloadAndFormatFile: async entry => ({
...entry,
// @ts-ignore
const dataUri = await this.worker.call('downloadFileInWorker', entry)
const test = dataURItoArrayBuffer(dataUri)
const filestream = test.arrayBuffer
return {
...entry,
filestream
}
},
dataUri: await this.worker.call('downloadFileInWorker', entry)
}),
existingFilesIndex
})
log.debug(result, 'saveFiles result')
Expand Down
24 changes: 0 additions & 24 deletions src/libs/utils.js

This file was deleted.

8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6380,10 +6380,10 @@ cozy-client@^40.0.1:
sift "^6.0.0"
url-search-params-polyfill "^8.0.0"

cozy-clisk@^0.20.3:
version "0.20.3"
resolved "https://registry.yarnpkg.com/cozy-clisk/-/cozy-clisk-0.20.3.tgz#aea89c99a1e015b0f2ef992004bf986a59c3b932"
integrity sha512-/dDL+6HivVuLXtoEeJdEfgNhiyziBdtB7HlLWveKXw/hIRYgYHR/V4H7zISVm+qXgrJC6m0i0VMtAnZIiY5aAQ==
cozy-clisk@^0.22.1:
version "0.22.1"
resolved "https://registry.yarnpkg.com/cozy-clisk/-/cozy-clisk-0.22.1.tgz#ef25631cb840395b8ebf2c691a400ce5af5f3705"
integrity sha512-pyi9iiC/uh6H8WvdsY+upqWnIrDs/HsjzxW8viNkqaykmtVaaipD0nqSY7Ymu2Q6bZ83V/+GABrAn2Dsit57CA==
dependencies:
"@cozy/minilog" "^1.0.0"
bluebird-retry "^0.11.0"
Expand Down
Loading