Files
klz-cables.com/.pnpm-store/v10/files/f8/cae8a9732a137ab82e5a0e029f08f94ad6811fc3fb14246b9258465623b1bed963f5d74107575392fafd8805301e8d498dfbcf5d7b00e81794d770b7614b6a
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

40 lines
1.2 KiB
Plaintext

import { APIError } from '../../errors/APIError.js';
import { isEligibleRequest } from './isEligibleRequest.js';
import { processMultipart } from './processMultipart.js';
import { debugLog } from './utilities.js';
const DEFAULT_UPLOAD_OPTIONS = {
abortOnLimit: false,
createParentPath: false,
debug: false,
defParamCharset: 'utf8',
limitHandler: false,
parseNested: false,
preserveExtension: false,
responseOnLimit: 'File size limit has been reached',
safeFileNames: false,
tempFileDir: 'tmp',
uploadTimeout: 60000,
uriDecodeFileNames: false,
useTempFiles: false
};
export const processMultipartFormdata = async ({ options: incomingOptions, request })=>{
const options = {
...DEFAULT_UPLOAD_OPTIONS,
...incomingOptions
};
if (!isEligibleRequest(request)) {
debugLog(options, 'Request is not eligible for file upload!');
return {
error: new APIError('Request is not eligible for file upload', 500),
fields: undefined,
files: undefined
};
} else {
return processMultipart({
options,
request
});
}
};
//# sourceMappingURL=index.js.map