@breautek/storm
Version:
Object-Oriented REST API framework
89 lines (73 loc) • 43 kB
HTML
<html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Options | @breautek/storm</title><meta name="description" content="Documentation for @breautek/storm"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">@breautek/storm</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/formidable.html">formidable</a></li><li><a href="" aria-current="page">Options</a></li></ul><h1>Interface Options</h1></div><div class="tsd-signature"><span class="tsd-signature-keyword">interface</span> <span class="tsd-kind-interface">Options</span> <span class="tsd-signature-symbol">{</span><br/> <a class="tsd-kind-property" href="#allowemptyfiles">allowEmptyFiles</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#createdirsfromuploads">createDirsFromUploads</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#enabledplugins">enabledPlugins</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#encoding">encoding</a><span class="tsd-signature-symbol">?:</span> <a href="../modules/formidable.html" class="tsd-signature-type tsd-kind-namespace">formidable</a><span class="tsd-signature-symbol">.</span><a href="../types/formidable.BufferEncoding.html" class="tsd-signature-type tsd-kind-type-alias">BufferEncoding</a><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#filename">filename</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">name</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">ext</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">part</span><span class="tsd-signature-symbol">:</span> <a href="../modules/formidable.html" class="tsd-signature-type tsd-kind-namespace">formidable</a><span class="tsd-signature-symbol">.</span><a href="formidable.Part.html" class="tsd-signature-type tsd-kind-interface">Part</a><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">form</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">IncomingForm</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#filewritestreamhandler">fileWriteStreamHandler</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">file</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">VolatileFile</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">Writable</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#filter">filter</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">part</span><span class="tsd-signature-symbol">:</span> <a href="../modules/formidable.html" class="tsd-signature-type tsd-kind-namespace">formidable</a><span class="tsd-signature-symbol">.</span><a href="formidable.Part.html" class="tsd-signature-type tsd-kind-interface">Part</a><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#hashalgorithm">hashAlgorithm</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">false</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#keepextensions">keepExtensions</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#maxfields">maxFields</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#maxfieldssize">maxFieldsSize</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#maxfiles">maxFiles</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#maxfilesize">maxFileSize</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#maxtotalfilesize">maxTotalFileSize</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#minfilesize">minFileSize</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#multiples">multiples</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="#uploaddir">uploadDir</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></div><aside class="tsd-sources"><ul><li>Defined in node_modules/.pnpm/@types+formidable@3.4.5/node_modules/@types/formidable/index.d.ts:80</li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h5 class="tsd-index-heading uppercase">Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="#allowemptyfiles" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>allow<wbr/>Empty<wbr/>Files?</span></a>
<a href="#createdirsfromuploads" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>create<wbr/>Dirs<wbr/>From<wbr/>Uploads?</span></a>
<a href="#enabledplugins" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>enabled<wbr/>Plugins?</span></a>
<a href="#encoding" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>encoding?</span></a>
<a href="#filename" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>filename?</span></a>
<a href="#filewritestreamhandler" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>file<wbr/>Write<wbr/>Stream<wbr/>Handler?</span></a>
<a href="#filter" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>filter?</span></a>
<a href="#hashalgorithm" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>hash<wbr/>Algorithm?</span></a>
<a href="#keepextensions" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>keep<wbr/>Extensions?</span></a>
<a href="#maxfields" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>max<wbr/>Fields?</span></a>
<a href="#maxfieldssize" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>max<wbr/>Fields<wbr/>Size?</span></a>
<a href="#maxfiles" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>max<wbr/>Files?</span></a>
<a href="#maxfilesize" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>max<wbr/>File<wbr/>Size?</span></a>
<a href="#maxtotalfilesize" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>max<wbr/>Total<wbr/>File<wbr/>Size?</span></a>
<a href="#minfilesize" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>min<wbr/>File<wbr/>Size?</span></a>
<a href="#multiples" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>multiples?</span></a>
<a href="#uploaddir" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>upload<wbr/>Dir?</span></a>
</div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h2>Properties</h2></summary><section><section class="tsd-panel tsd-member tsd-is-external"><h3 class="tsd-anchor-link" id="allowemptyfiles"><code class="tsd-tag">Optional</code><span>allow<wbr/>Empty<wbr/>Files</span><a href="#allowemptyfiles" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">allowEmptyFiles</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>allow upload empty files</p>
</div><div class="tsd-comment tsd-typography"><div class="tsd-tag-default"><h4 class="tsd-anchor-link" id="default">Default<a href="#default" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-0">true</span>
</code><button type="button">Copy</button></pre>
</div></div><aside class="tsd-sources"><ul><li>Defined in node_modules/.pnpm/@types+formidable@3.4.5/node_modules/@types/formidable/index.d.ts:107</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-external"><h3 class="tsd-anchor-link" id="createdirsfromuploads"><code class="tsd-tag">Optional</code><span>create<wbr/>Dirs<wbr/>From<wbr/>Uploads</span><a href="#createdirsfromuploads" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">createDirsFromUploads</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>If true, makes direct folder uploads possible.</p>
</div><div class="tsd-comment tsd-typography"><div class="tsd-tag-default"><h4 class="tsd-anchor-link" id="default-1">Default<a href="#default-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-0">false</span>
</code><button type="button">Copy</button></pre>
</div></div><aside class="tsd-sources"><ul><li>Defined in node_modules/.pnpm/@types+formidable@3.4.5/node_modules/@types/formidable/index.d.ts:186</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-external"><h3 class="tsd-anchor-link" id="enabledplugins"><code class="tsd-tag">Optional</code><span>enabled<wbr/>Plugins</span><a href="#enabledplugins" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">enabledPlugins</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in node_modules/.pnpm/@types+formidable@3.4.5/node_modules/@types/formidable/index.d.ts:196</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-external"><h3 class="tsd-anchor-link" id="encoding"><code class="tsd-tag">Optional</code><span>encoding</span><a href="#encoding" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">encoding</span><span class="tsd-signature-symbol">?:</span> <a href="../modules/formidable.html" class="tsd-signature-type tsd-kind-namespace">formidable</a><span class="tsd-signature-symbol">.</span><a href="../types/formidable.BufferEncoding.html" class="tsd-signature-type tsd-kind-type-alias">BufferEncoding</a></div><div class="tsd-comment tsd-typography"><p>sets encoding for incoming form fields</p>
</div><div class="tsd-comment tsd-typography"><div class="tsd-tag-default"><h4 class="tsd-anchor-link" id="default-2">Default<a href="#default-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-1">'utf-8'</span>
</code><button type="button">Copy</button></pre>
</div></div><aside class="tsd-sources"><ul><li>Defined in node_modules/.pnpm/@types+formidable@3.4.5/node_modules/@types/formidable/index.d.ts:86</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-external"><h3 class="tsd-anchor-link" id="filename"><code class="tsd-tag">Optional</code><span>filename</span><a href="#filename" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">filename</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">name</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">ext</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">part</span><span class="tsd-signature-symbol">:</span> <a href="../modules/formidable.html" class="tsd-signature-type tsd-kind-namespace">formidable</a><span class="tsd-signature-symbol">.</span><a href="formidable.Part.html" class="tsd-signature-type tsd-kind-interface">Part</a><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">form</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">IncomingForm</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">string</span></div><div class="tsd-comment tsd-typography"><p>Use it to control newFilename. Must return a string. Will be joined with
options.uploadDir.</p>
</div><div class="tsd-comment tsd-typography"><div class="tsd-tag-default"><h4 class="tsd-anchor-link" id="default-3">Default<a href="#default-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-0">undefined</span>
</code><button type="button">Copy</button></pre>
</div></div><aside class="tsd-sources"><ul><li>Defined in node_modules/.pnpm/@types+formidable@3.4.5/node_modules/@types/formidable/index.d.ts:194</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-external"><h3 class="tsd-anchor-link" id="filewritestreamhandler"><code class="tsd-tag">Optional</code><span>file<wbr/>Write<wbr/>Stream<wbr/>Handler</span><a href="#filewritestreamhandler" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">fileWriteStreamHandler</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">file</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">VolatileFile</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">Writable</span></div><div class="tsd-comment tsd-typography"><p>which by default writes to host machine file system every file parsed; The function should
return an instance of a Writable stream that will receive the uploaded file data. With this
option, you can have any custom behavior regarding where the uploaded file data will be
streamed for. If you are looking to write the file uploaded in other types of cloud storages
(AWS S3, Azure blob storage, Google cloud storage) or private file storage, this is the option
you're looking for. When this option is defined the default behavior of writing the file in the
host machine file system is lost.</p>
</div><div class="tsd-comment tsd-typography"><div class="tsd-tag-default"><h4 class="tsd-anchor-link" id="default-4">Default<a href="#default-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-0">null</span>
</code><button type="button">Copy</button></pre>
</div></div><aside class="tsd-sources"><ul><li>Defined in node_modules/.pnpm/@types+formidable@3.4.5/node_modules/@types/formidable/index.d.ts:170</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-external"><h3 class="tsd-anchor-link" id="filter"><code class="tsd-tag">Optional</code><span>filter</span><a href="#filter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">filter</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">part</span><span class="tsd-signature-symbol">:</span> <a href="../modules/formidable.html" class="tsd-signature-type tsd-kind-namespace">formidable</a><span class="tsd-signature-symbol">.</span><a href="formidable.Part.html" class="tsd-signature-type tsd-kind-interface">Part</a><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in node_modules/.pnpm/@types+formidable@3.4.5/node_modules/@types/formidable/index.d.ts:198</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-external"><h3 class="tsd-anchor-link" id="hashalgorithm"><code class="tsd-tag">Optional</code><span>hash<wbr/>Algorithm</span><a href="#hashalgorithm" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">hashAlgorithm</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">false</span></div><div class="tsd-comment tsd-typography"><p>include checksums calculated for incoming files, set this to some hash algorithm, see
crypto.createHash for available algorithms</p>
</div><div class="tsd-comment tsd-typography"><div class="tsd-tag-default"><h4 class="tsd-anchor-link" id="default-5">Default<a href="#default-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-0">false</span>
</code><button type="button">Copy</button></pre>
</div></div><aside class="tsd-sources"><ul><li>Defined in node_modules/.pnpm/@types+formidable@3.4.5/node_modules/@types/formidable/index.d.ts:157</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-external"><h3 class="tsd-anchor-link" id="keepextensions"><code class="tsd-tag">Optional</code><span>keep<wbr/>Extensions</span><a href="#keepextensions" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">keepExtensions</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>to include the extensions of the original files or not</p>
</div><div class="tsd-comment tsd-typography"><div class="tsd-tag-default"><h4 class="tsd-anchor-link" id="default-6">Default<a href="#default-6" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-0">false</span>
</code><button type="button">Copy</button></pre>
</div></div><aside class="tsd-sources"><ul><li>Defined in node_modules/.pnpm/@types+formidable@3.4.5/node_modules/@types/formidable/index.d.ts:100</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-external"><h3 class="tsd-anchor-link" id="maxfields"><code class="tsd-tag">Optional</code><span>max<wbr/>Fields</span><a href="#maxfields" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">maxFields</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><div class="tsd-comment tsd-typography"><p>limit the number of fields, set 0 for unlimited</p>
</div><div class="tsd-comment tsd-typography"><div class="tsd-tag-default"><h4 class="tsd-anchor-link" id="default-7">Default<a href="#default-7" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-2">1000</span>
</code><button type="button">Copy</button></pre>
</div></div><aside class="tsd-sources"><ul><li>Defined in node_modules/.pnpm/@types+formidable@3.4.5/node_modules/@types/formidable/index.d.ts:142</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-external"><h3 class="tsd-anchor-link" id="maxfieldssize"><code class="tsd-tag">Optional</code><span>max<wbr/>Fields<wbr/>Size</span><a href="#maxfieldssize" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">maxFieldsSize</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><div class="tsd-comment tsd-typography"><p>limit the amount of memory all fields together (except files) can allocate in bytes</p>
</div><div class="tsd-comment tsd-typography"><div class="tsd-tag-default"><h4 class="tsd-anchor-link" id="default-8">Default<a href="#default-8" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-2">20</span><span class="hl-3"> * </span><span class="hl-2">1024</span><span class="hl-3"> * </span><span class="hl-2">1024</span>
</code><button type="button">Copy</button></pre>
</div></div><aside class="tsd-sources"><ul><li>Defined in node_modules/.pnpm/@types+formidable@3.4.5/node_modules/@types/formidable/index.d.ts:149</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-external"><h3 class="tsd-anchor-link" id="maxfiles"><code class="tsd-tag">Optional</code><span>max<wbr/>Files</span><a href="#maxfiles" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">maxFiles</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><div class="tsd-comment tsd-typography"><p>limit the amount of uploaded files, set Infinity for unlimited</p>
</div><div class="tsd-comment tsd-typography"><div class="tsd-tag-default"><h4 class="tsd-anchor-link" id="default-9">Default<a href="#default-9" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-0">Infinity</span>
</code><button type="button">Copy</button></pre>
</div></div><aside class="tsd-sources"><ul><li>Defined in node_modules/.pnpm/@types+formidable@3.4.5/node_modules/@types/formidable/index.d.ts:121</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-external"><h3 class="tsd-anchor-link" id="maxfilesize"><code class="tsd-tag">Optional</code><span>max<wbr/>File<wbr/>Size</span><a href="#maxfilesize" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">maxFileSize</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><div class="tsd-comment tsd-typography"><p>limit the size of uploaded file</p>
</div><div class="tsd-comment tsd-typography"><div class="tsd-tag-default"><h4 class="tsd-anchor-link" id="default-10">Default<a href="#default-10" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-2">200</span><span class="hl-3"> * </span><span class="hl-2">1024</span><span class="hl-3"> * </span><span class="hl-2">1024</span>
</code><button type="button">Copy</button></pre>
</div></div><aside class="tsd-sources"><ul><li>Defined in node_modules/.pnpm/@types+formidable@3.4.5/node_modules/@types/formidable/index.d.ts:128</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-external"><h3 class="tsd-anchor-link" id="maxtotalfilesize"><code class="tsd-tag">Optional</code><span>max<wbr/>Total<wbr/>File<wbr/>Size</span><a href="#maxtotalfilesize" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">maxTotalFileSize</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><div class="tsd-comment tsd-typography"><p>limit the size of the batch of uploaded files</p>
</div><div class="tsd-comment tsd-typography"><div class="tsd-tag-default"><h4 class="tsd-anchor-link" id="default-11">Default<a href="#default-11" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-4">options</span><span class="hl-3">.</span><span class="hl-4">maxFileSize</span>
</code><button type="button">Copy</button></pre>
</div></div><aside class="tsd-sources"><ul><li>Defined in node_modules/.pnpm/@types+formidable@3.4.5/node_modules/@types/formidable/index.d.ts:135</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-external"><h3 class="tsd-anchor-link" id="minfilesize"><code class="tsd-tag">Optional</code><span>min<wbr/>File<wbr/>Size</span><a href="#minfilesize" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">minFileSize</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><div class="tsd-comment tsd-typography"><p>the minium size of uploaded file</p>
</div><div class="tsd-comment tsd-typography"><div class="tsd-tag-default"><h4 class="tsd-anchor-link" id="default-12">Default<a href="#default-12" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-2">1</span>
</code><button type="button">Copy</button></pre>
</div></div><aside class="tsd-sources"><ul><li>Defined in node_modules/.pnpm/@types+formidable@3.4.5/node_modules/@types/formidable/index.d.ts:114</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-external"><h3 class="tsd-anchor-link" id="multiples"><code class="tsd-tag">Optional</code><span>multiples</span><a href="#multiples" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">multiples</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>when you call the .parse method, the files argument (of the callback) will contain arrays of
files for inputs which submit multiple files using the HTML5 multiple attribute. Also, the
fields argument will contain arrays of values for fields that have names ending with '[]'</p>
</div><div class="tsd-comment tsd-typography"><div class="tsd-tag-default"><h4 class="tsd-anchor-link" id="default-13">Default<a href="#default-13" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-0">false</span>
</code><button type="button">Copy</button></pre>
</div></div><aside class="tsd-sources"><ul><li>Defined in node_modules/.pnpm/@types+formidable@3.4.5/node_modules/@types/formidable/index.d.ts:179</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-external"><h3 class="tsd-anchor-link" id="uploaddir"><code class="tsd-tag">Optional</code><span>upload<wbr/>Dir</span><a href="#uploaddir" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">uploadDir</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><div class="tsd-comment tsd-typography"><p>the directory for placing file uploads in. You can move them later by using fs.rename()</p>
</div><div class="tsd-comment tsd-typography"><div class="tsd-tag-default"><h4 class="tsd-anchor-link" id="default-14">Default<a href="#default-14" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-4">os</span><span class="hl-3">.</span><span class="hl-5">tmpdir</span><span class="hl-3">()</span>
</code><button type="button">Copy</button></pre>
</div></div><aside class="tsd-sources"><ul><li>Defined in node_modules/.pnpm/@types+formidable@3.4.5/node_modules/@types/formidable/index.d.ts:93</li></ul></aside></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#allowemptyfiles" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>allow<wbr/>Empty<wbr/>Files</span></a><a href="#createdirsfromuploads" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>create<wbr/>Dirs<wbr/>From<wbr/>Uploads</span></a><a href="#enabledplugins" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>enabled<wbr/>Plugins</span></a><a href="#encoding" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>encoding</span></a><a href="#filename" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>filename</span></a><a href="#filewritestreamhandler" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>file<wbr/>Write<wbr/>Stream<wbr/>Handler</span></a><a href="#filter" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>filter</span></a><a href="#hashalgorithm" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>hash<wbr/>Algorithm</span></a><a href="#keepextensions" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>keep<wbr/>Extensions</span></a><a href="#maxfields" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>max<wbr/>Fields</span></a><a href="#maxfieldssize" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>max<wbr/>Fields<wbr/>Size</span></a><a href="#maxfiles" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>max<wbr/>Files</span></a><a href="#maxfilesize" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>max<wbr/>File<wbr/>Size</span></a><a href="#maxtotalfilesize" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>max<wbr/>Total<wbr/>File<wbr/>Size</span></a><a href="#minfilesize" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>min<wbr/>File<wbr/>Size</span></a><a href="#multiples" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>multiples</span></a><a href="#uploaddir" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>upload<wbr/>Dir</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html">@breautek/storm</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>