0

I want to upload a file to fastify server,How could I do?

There are some relative modules:

  • fastify-file-upload
  • fastify-multipart ...
radiorz
  • 1,459
  • 4
  • 18
  • 36

1 Answers1

0

The difference between the two is how the file is sent to the server. You should select one depending on how large your file is. Multi-part data is divided into chunks and sent to the sever (necessary for large files) while the regular upload will send the file as a single chunk.

Considering that your file size might become large enough to use the multi-part option then you may want to go ahead and implement it.

Both packages have good examples of how to upload a file so you just need to decide which package to use.

A Webb
  • 633
  • 1
  • 8
  • 16