()
| 783 | } |
| 784 | }) |
| 785 | async function read() { |
| 786 | for await (const part of parser) { |
| 787 | if (part._tag === "Field") { |
| 788 | parts.push([ |
| 789 | "field", |
| 790 | part.info.name, |
| 791 | Multipart.decodeField(part.info, part.value), |
| 792 | part.info.contentType |
| 793 | ]) |
| 794 | } else { |
| 795 | let size = 0 |
| 796 | for await (const chunk of part) { |
| 797 | size += chunk.length |
| 798 | } |
| 799 | parts.push([ |
| 800 | "file", |
| 801 | part.info.name, |
| 802 | size, |
| 803 | part.info.filename!, |
| 804 | part.info.contentType |
| 805 | ]) |
| 806 | } |
| 807 | } |
| 808 | } |
| 809 | |
| 810 | const readPromise = read() |
| 811 |
no test coverage detected