MUKUL47/Bulk-Upload-Vanilla ? reverse-engineered prompt

Reverse engineered prompt

Build me a small TypeScript library for handling bulk file uploads in the browser.

It should let me pass in a list of files, upload several at the same time with a configurable concurrency limit, and keep track of what is queued, uploading, completed, and failed. I need callbacks for upload progress and download progress for each file, plus an overall update callback so I can show the current state in the UI.

Please also include controls I can call to cancel a file, retry failed uploads, destroy the whole queue, and update the queue when files change. The upload request should be customizable so I can plug in my own URL, method, headers, and FormData logic.

If it makes sense, support sending folder uploads too, with a file hierarchy structure like Google Drive style nested paths. Keep it simple to use from the browser, and make sure the public API is easy to import and work with. If you need to check current docs for anything, feel free to look them up online.