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

Bind original request to onFile function this #431

Merged
merged 4 commits into from
Apr 7, 2023

Conversation

digitalmio
Copy link
Contributor

@digitalmio digitalmio commented Apr 3, 2023

Checklist

Gives access to original request via this on onFile function. This should be useful to link file handler with original request or create unique IDs based on request id.
Fixes #427

index.js Outdated Show resolved Hide resolved
Co-authored-by: Manuel Spigolon <behemoth89@gmail.com>
@digitalmio
Copy link
Contributor Author

Not sure if I should change package.json too and bump version to 7.5.1?

@digitalmio digitalmio requested a review from Eomm April 4, 2023 09:22
Copy link
Member

@Eomm Eomm left a comment

Choose a reason for hiding this comment

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

Not sure if I should change package.json too and bump version to 7.5.1?

Nope

@Eomm Eomm requested a review from Uzlopak April 4, 2023 13:02
@digitalmio
Copy link
Contributor Author

Any chance to get this approved and merged pls?

@Eomm Eomm requested a review from a team April 7, 2023 07:35
@Eomm Eomm merged commit 6aef4e1 into fastify:master Apr 7, 2023
13 checks passed
@liudichen
Copy link

what if onFile is an arrow function. this may not be able to point correctly.

@Eomm
Copy link
Member

Eomm commented Apr 18, 2023

when the user sets the arrow function, it should know that the this context is the upper scope - as it works in the fastify's handler, decorators and hooks

@renovate renovate bot mentioned this pull request Jun 24, 2023
1 task
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.

Option to append request.id / other unique ID to onFile?
4 participants