- 37개 파일 IP → zioinfo.co.kr 치환 (소스/매뉴얼/설정/하네스) - Manager DrConsole/NetworkConsole/CsapConsole 빌드 + /var/www/manager/ 배포 - 테스트: Manager HTTP 200, ITSM 신규 API 7개 전체 200 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| cjs/src | ||
| esm | ||
| src | ||
| test | ||
| types | ||
| index.js | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
multipart-parser
A simple multipart/form-data parser to use with ReadableStreams
Based on https://github.com/ssttevee/js-multipart-parser
Install
# install it as a dependency
$ npm i @web3-storage/multipart-parser
Usage
import { parseMultipart } from '@web3-storage/multipart-parser';
...
async function requestHandler(req) {
const boundary = '----whatever';
const parts = await parseMultipart(req.body, boundary);
const fd = new FormData();
for (const { name, data, filename, contentType } of parts) {
if (filename) {
fd.append(name, new Blob([data], { type: contentType }), filename);
} else {
fd.append(name, new TextDecoder().decode(data), filename);
}
}
}
Releasing
You can publish by either running npm publish in the dist directory or using npx ipjs publish.