Skip to content

Commit cb4db8f

Browse files
lethemanhrezk2ll
authored andcommitted
feat: Update FileImageLoader to be used in shared drive ✨
1 parent 2b77119 commit cb4db8f

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

react/ActionsMenu/Actions/download.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,13 @@ export const download = ({ encryptedUrl }) => {
3636
icon,
3737
label,
3838
Component: makeComponent(label, icon),
39-
action: (docs, { client, webviewIntent }) =>
40-
downloadFile({ client, file: docs[0], url: encryptedUrl, webviewIntent })
39+
action: (docs, { client, webviewIntent, driveId }) =>
40+
downloadFile({
41+
client,
42+
file: docs[0],
43+
url: encryptedUrl,
44+
webviewIntent,
45+
driveId
46+
})
4147
}
4248
}

react/FileImageLoader/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ export class FileImageLoader extends Component {
142142
throw new Error('No pdf files fallback')
143143
}
144144
const src = await client
145-
.collection('io.cozy.files')
145+
.collection('io.cozy.files', { driveId: file.driveId })
146146
.getDownloadLinkById(this.getFileId(file), file.name)
147147
await checkImageSource(src)
148148
if (this._mounted) {

0 commit comments

Comments
 (0)