2
await sails.upload(inputs.logo);

await sails.upload(inputs.thumbnail);

I use sails-hook-uploads. Only the first incoming file (logo, in my case) is uploaded and for thumbnail, it shows this message.

Upstream (file upload: thumbnail) emitted an error: { Error: EMAXBUFFER: An upstream (thumbnail) timed out before it was plugged into a receiver. It was still unused after waiting 4500ms. You can configure this timeout by changing the maxTimeToBuffer option.

Is there anyway I can fix that or alternative simple way to upload files from different file inputs in sailsjs?

1 Answers1

-1

Since you are uploading files one by one, try using uploadOne.

await sails.uploadOne(inputs.logo);

await sails.uploadOne(inputs.thumbnail);
Vikas Kumar
  • 2,978
  • 3
  • 14
  • 24