fix(koa): Replace koa-bodyparser with koa-body#3093
fix(koa): Replace koa-bodyparser with koa-body#3093daffl merged 1 commit intofeathersjs:dovefrom 8BallBomBom:dove
Conversation
|
Is possible to create a sample how to upload a file using koa-body? I can see the file being saved on the OS but I don't know how to get the filename saved using the context. This is how I configured: Thanks |
|
The way i'm handling this currently is by using the koa before hook in a service, check this. As for the right way to implement things, that is a good question, currently i'm rocking a janky implementation of |
|
Thanks. That's what I ended up using too. This is the code that I'm using although I also don't know if it's the best implementation but it's working like charm. |
|
Thanks for sharing, if i find a better way to handle things then i'll probably contribute towards the docs 👍🏻 |
Been looking at possible ways to implement an upload service.
After looking over the current options it would appear either we use
koa-bodyto allow handling ofmultipart/form-dataor we roll the dice and find another package askoa-bodyparserdoesn't supportmultipart/form-data.There is also the option where each developer could import and use
koa-bodythemselves.But there is currently a type compatibility issue with the older
koa-bodyparserpackage.More info over here.
What i can say though is it seems
koa-bodyfunctions as a more up to date feature full drop in replacement.Might need some extra testing though.