Skip to content

Update gridfs-streaming.md#819

Merged
dr-dimitru merged 4 commits intoveliovgroup:devfrom
Prinzhorn:patch-6
Jun 8, 2022
Merged

Update gridfs-streaming.md#819
dr-dimitru merged 4 commits intoveliovgroup:devfrom
Prinzhorn:patch-6

Conversation

@Prinzhorn
Copy link
Copy Markdown
Contributor

Correct me if I'm wrong, but this is not accurate. The files are streamed to the client using bucket.openDownloadStream, see https://github.com/veliovgroup/Meteor-Files/blob/master/docs/gridfs-bucket-integration.md#4-create-download-handler

That means the entire file does not need to be held in server memory. Correct?

dr-dimitru and others added 4 commits February 5, 2021 00:16
v2.0.0

Major update is out 🎉

__Major changes__:

- ⚠️ __[Deprecated]__ `streams` of `.insert()` method;
- ☝️ `http` module raplcaed with `fetch` — *As suggested* in `meteor@2.0.0` release and `http` package being deprecated;
- ☝️ `request-libcurl` replaced with `fetch` — As a fix for veliovgroup#781 and similar issues;
- ⚠️ __[removed]__ `file-type` library used to detect file-type (*file's mime-type*) based on "magic numbers". Now mime-type detected from data supplied by browser. __Regresion possible *upgrade with care* if your app rely on mime-type detected after file is fully uploaded to server, this change won't affect mime-type detected on the *Client* before file fully loaded to server__.

__Improved__:

- Pause/Resume logic when connection with server is interrupted (*no more missed chunks*);
- Chunks deliverability, including retries if chunk was sent only partially.

__Other changes__:

- 🤝 Compatibility with `meteor@2.0.0`;
- 📦 `ostrio:cookies@2.7.0`, *was `v2.6.1`*;
- 📦 `fs-extra@9.1.0`, *was `v9.0.1`*;
- 🖥 Update, refactor, and refine [demo app](https://github.com/veliovgroup/meteor-files-website);
- 👨‍💻 Update [`meteor-files-autoform`](https://github.com/VeliovGroup/meteor-autoform-file) package;
- 📋 Documentation refactoring.
v2.0.1

__New:__
- ✨ `config.disableSetTokenCookie` see veliovgroup#776 and veliovgroup#778 for details, thanks to @Kaczkazniszczenia

__Changed:__
- 👨‍💻 Abort http-fetch requests when calling `.abort()`;
- 👨‍💻 Make sure no other/delayed requests/responses executed;
@Prinzhorn Prinzhorn changed the base branch from master to dev August 23, 2021 14:31
@jankapunkt
Copy link
Copy Markdown
Collaborator

Why do you create a PR for each of these? I mean it's okay to have distinctive PRs but this is all about the gridfs documentation. I think this could all be handled in one PR having several commits for each changes. Makes reviewing also much easier.

cc @dr-dimitru

@Prinzhorn
Copy link
Copy Markdown
Contributor Author

Prinzhorn commented Aug 23, 2021

Because I'm following along the docs and open a PR when I run into an issue (using the GitHub UI). That is much easier on my end than to first keep a list of them and then go back to create a single PR and edit my fork and then push the changes. I though it would be a lot easier for you to hit merge five times than for me to keep updating a PR. Blame GitHub for having a limited "edit" button 😄

Also I wasn't expecting to make multiple changes when I started and thought it would would remain a single PR.

@jankapunkt
Copy link
Copy Markdown
Collaborator

I though it would be a lot easier for you to hit merge five times than for me to keep updating a PR

That's not how a review works :-) So I have to make 5 reviews now and in the end one more final review to see if all the changed code examples work, when applying to a real app, for example like this one: https://github.com/veliovgroup/files-gridfs-autoform-example

@jankapunkt
Copy link
Copy Markdown
Collaborator

jankapunkt commented Aug 23, 2021

@Prinzhorn let me see if I can put them into one PR, git is fortunately not limited to what GitHub offers

@Prinzhorn
Copy link
Copy Markdown
Contributor Author

Prinzhorn commented Aug 23, 2021

Thanks!

Two of them are just text, nothing to test. One is literally syntax error (semicolon in an object literal). The two forgotten export make copy paste harder. And createAfterUpdate is a typo because the code that uses it has import { createOnAfterUpload } from 'path/to/createOnAfterUpload' and onAfterUpload: createOnAfterUpload(imageBucket),. They all currently prevent the code form working at all, so I'd be surprised if the example uses it.

I'm sorry for just throwing these PRs at you but I wanted to keep my flow and just spend the five seconds to open a PR via the UI.

I did get GridFS fully working now with these changes. (plus #818)

@jankapunkt
Copy link
Copy Markdown
Collaborator

I will add code for gird-fs straming with GridFSBucket, since it is slightly different. However I first need to make this running in our project at work.

@dr-dimitru dr-dimitru merged commit 0351878 into veliovgroup:dev Jun 8, 2022
@Prinzhorn Prinzhorn deleted the patch-6 branch June 9, 2022 09:38
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.

3 participants