Is that a good option to make upload to local storage in new threads

Hi, I just find that the local storage function for uploads are implemented in the same thread of the Rails server, will that block the Rails server if too many uploads at the same time, so I just want to know if it is better to implement the local storage disk IO functions in a new threads? Or it is good with the current implementation?

Uploads are implemented in multiple ways.

S3 uploads go direct to S3
NGINX fronted uploads use SENDFILE which means rails gets the entire file to work with

We also shuffle stuff to background threads as needed using hijack and defer.

We are always open to improving things if you want to try a PR and there is a particular issue you are battling with.