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: Use new downloadFile() method from cozy-client #2690

Closed
wants to merge 1 commit into from

Conversation

Ldoppea
Copy link
Member

@Ldoppea Ldoppea commented Aug 26, 2024

In cozy/cozy-client#1518 we implemented a new downloadFile() that allow to download files as before in a browser, but will download files through cozy-intent when hosted in the Flagship app

This commit will replace the old way to download files with the new one using downloadFile()


Related PRs:

return client.collection('io.cozy.files').forceFileDownload(url, file.name)
}
return client.collection('io.cozy.files').download(file)
export const downloadFile = async ({ client, file, url, webviewIntent }) => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on pourrait plutôt faire un BC (avec éventuellement codemods) je pense, un réexport de fonction d'une lib à l'autre ça me semble délicat...

Copy link
Member Author

@Ldoppea Ldoppea Aug 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

J'ai fais le changement avec un BC, mais je n'ai pas fait de codemods, je n'ai pas vu de trace de cet appel hors cozy-ui donc je ne pense pas que ça existe

In cozy/cozy-client#1518 we implemented a new `downloadFile()` that
allow to download files as before in a browser, but will download files
through cozy-intent when hosted in the Flagship app

This commit will replace the old way to download files with the new one
using `downloadFile()`

BREAKING CHANGE: `downloadFile()` method has been removed from
`react/Vierwer/helpers.js`. Use the one from
`cozy-client/dist/models/file` instead
@Ldoppea Ldoppea force-pushed the feat/download_files_offline branch from e9e37f2 to a64adb0 Compare August 27, 2024 13:59
@Ldoppea
Copy link
Member Author

Ldoppea commented Sep 12, 2024

Closed in favor of cozy/cozy-libs#2581

@Ldoppea Ldoppea closed this Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants