Open cwschilly opened 3 months ago
We attempted to use p-limit for rate limiting, but ran into errors/vulnerability issues with the npm packages that we currently use.
Investigate these steps:
npm install p-limit
import pLimit from 'p-limit'; if (files && files.length > 0) { const limit = pLimit(5); const uploadPromises = formDataArray.map((formData) => limit(() => [axios.post](http://axios.post/)('http://127.0.0.1:8000/api/upload', formData, { headers: { 'Content-Type': 'multipart/form-data' }, })) );
We attempted to use p-limit for rate limiting, but ran into errors/vulnerability issues with the npm packages that we currently use.
Investigate these steps: