-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fastify #9106
Conversation
tasukete |
@syuilo I managed to fix this issue by extracting "actual" values from multipart fields (ycanardeau@e8fab4a), although I'm not sure if this is the right way to fix it. |
const [path] = await createTemp(); | ||
await pump(multipartData.file, fs.createWriteStream(path)); | ||
|
||
const token = multipartData.fields['i']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is that the multipartData.fields
property returns an object like this:
{
i: {
fieldname: 'i',
mimetype: 'text/plain',
value: /* ... */,
// ...
},
force: {
fieldname: 'force',
mimetype: 'text/plain',
value: 'true',
// ...
},
file: {
fieldname: 'file',
filename: 'blob',
mimetype: /* ... */,
file: /* ... */,
// ...
},
name: {
fieldname: 'name',
mimetype: 'text/plain',
value: /* ... */,
// ...
}
}
The extractMultipartFields
method converts this object into the following format:
{
i: /* ... */,
force: 'true',
file: undefined,
name: /* ... */
}
However, one of the problems of the extractMultipartFields
method is that it contains file: undefined
, which does not exist on koa's equivalent. I'm not sure if this would be a problem though.
Re: https://misskey.io/notes/989o0zrglu @syuilo I was experiencing exactly the same issue on Windows 11 when I merged the latest commit from 7b563c1. I just deleted |
tasukete |
https://p1.a9z.dev/queue なくなった? |
あー忘れてた |
既知の問題: inboxがお亡くなりになってる |
inboxはエラーも出てない |
This reverts commit 3a7182b.
This reverts commit 3a7182b.
謎 |
てか逆にこれが効いたとすると、すべてのfastifyインスタンスのReplyにsendFileが生えてることになっちゃわない?(実際はプラグインを明示的にregisterしたインスタンスだけに生える) |
:tasukete: |
This reverts commit cfe148b.
What
Resolve #7537
Why
Additional info (optional)