MCPcopy Create free account
hub / github.com/axe-api/axe-api / files

Method files

packages/axe-api/src/Services/AxeRequest.ts:120–129  ·  view source on GitHub ↗

* Parse and get uploaded files. It uses `formidable` internally. * * @param options * @returns

(options?: FormOptions)

Source from the content-addressed store, hash-verified

118 * @returns
119 */
120 async files(options?: FormOptions) {
121 if (!this.header("content-type")?.includes("multipart/form-data")) {
122 LogService.warn(`Content-type must be 'multipart/form-data'.`);
123 throw new Error(`Content-type must be 'multipart/form-data'.`);
124 }
125
126 LogService.debug(`Form data is parsing`);
127 const form = formidable(options || this.version?.config.formidable || {});
128 return await form.parse(this.request);
129 }
130
131 /**
132 * Get the original `IncomingMessage` request.

Callers

nothing calls this directly

Calls 3

headerMethod · 0.95
warnMethod · 0.80
debugMethod · 0.80

Tested by

no test coverage detected