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

[Question] Channels download.delete and download.createReadStream #3262

Closed
kblok opened this issue Jul 31, 2020 · 3 comments
Closed

[Question] Channels download.delete and download.createReadStream #3262

kblok opened this issue Jul 31, 2020 · 3 comments
Assignees

Comments

@kblok
Copy link
Contributor

kblok commented Jul 31, 2020

I realized that download.delete is using a channel to delete the file. I thought that it would make sense if we'd have a remote server. The file would be in the server, not in the client.

But then I found that download.createReadStream is solving everything on the client-side. I think this is quite inconsistent. Or we address everything on the server (getting ready for a remote server), or we solve file manipulation on the client.

@kblok
Copy link
Contributor Author

kblok commented Jul 31, 2020

Thoughts @pavelfeldman?

@aslushnikov
Copy link
Contributor

@kblok feel free to ping us on slack :-) I'll close the issue here.

@dgozman
Copy link
Contributor

dgozman commented Aug 27, 2020

With #3634, we now have:

  • download.path works locally and throws in remote scenario;
  • download.delete always deletes on the server;
  • download.createReadStream streams bytes from the local file or remote server;
  • download.saveAs copies a file when running locally or uses saveAsStream to stream bytes from remote server to save locally.

Feel free to ask more questions.

@dgozman dgozman closed this as completed Aug 27, 2020
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

No branches or pull requests

4 participants