Skip to content

Commit

Permalink
fix: Let cozy-clisk convert dataUri to arrayBuffer itself
Browse files Browse the repository at this point in the history
  • Loading branch information
doubleface committed Aug 4, 2023
1 parent 14ba0e2 commit 858e289
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 35 deletions.
16 changes: 5 additions & 11 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,10 @@ export default class Launcher {
sourceAccount: job.message.account,
sourceAccountIdentifier,
// @ts-ignore
downloadAndFormatFile: async entry => {
// @ts-ignore
const dataUri = await this.worker.call('downloadFileInWorker', entry)
const test = dataURItoArrayBuffer(dataUri)
const filestream = test.arrayBuffer
return {
...entry,
filestream
}
},
downloadAndFormatFile: async entry => ({
...entry,
dataUri: await this.worker.call('downloadFileInWorker', entry)

Check failure on line 463 in src/libs/Launcher.js

View workflow job for this annotation

GitHub Actions / quality_checks

Property 'worker' does not exist on type 'Launcher'.
}),
existingFilesIndex
})
log.debug(result, 'saveFiles result')
Expand Down
24 changes: 0 additions & 24 deletions src/libs/utils.js

This file was deleted.

0 comments on commit 858e289

Please sign in to comment.