-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodule-formdata.html
More file actions
314 lines (85 loc) · 16.9 KB
/
module-formdata.html
File metadata and controls
314 lines (85 loc) · 16.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>formdata - Documentation</title>
<script src="scripts/prettify/prettify.js"></script>
<script src="scripts/prettify/lang-css.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
<script src="scripts/nav.js" defer></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
<div class="navicon"></div>
</label>
<label for="nav-trigger" class="overlay"></label>
<nav >
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="module-dashboard-Dashboard.html">Dashboard</a><ul class='methods'><li data-type='method'><a href="module-dashboard-Dashboard.html#renderChart">renderChart</a></li><li data-type='method'><a href="module-dashboard-Dashboard.html#toBuffer">toBuffer</a></li><li data-type='method'><a href="module-dashboard-Dashboard.html#toDataURL">toDataURL</a></li></ul></li><li><a href="module-image-ImageProcessor.html">ImageProcessor</a><ul class='methods'><li data-type='method'><a href="module-image-ImageProcessor.html#blur">blur</a></li><li data-type='method'><a href="module-image-ImageProcessor.html#composite">composite</a></li><li data-type='method'><a href="module-image-ImageProcessor.html#flip">flip</a></li><li data-type='method'><a href="module-image-ImageProcessor.html#flop">flop</a></li><li data-type='method'><a href="module-image-ImageProcessor.html#format">format</a></li><li data-type='method'><a href="module-image-ImageProcessor.html#greyscale">greyscale</a></li><li data-type='method'><a href="module-image-ImageProcessor.html#resize">resize</a></li><li data-type='method'><a href="module-image-ImageProcessor.html#rotate">rotate</a></li><li data-type='method'><a href="module-image-ImageProcessor.html#sharpen">sharpen</a></li><li data-type='method'><a href="module-image-ImageProcessor.html#toBuffer">toBuffer</a></li><li data-type='method'><a href="module-image-ImageProcessor.html#toFile">toFile</a></li></ul></li></ul><h3>Modules</h3><ul><li><a href="module-auth.html">auth</a></li><li><a href="module-cache.html">cache</a><ul class='methods'><li data-type='method'><a href="module-cache.html#.clear">clear</a></li><li data-type='method'><a href="module-cache.html#.del">del</a></li><li data-type='method'><a href="module-cache.html#.get">get</a></li><li data-type='method'><a href="module-cache.html#.set">set</a></li></ul></li><li><a href="module-chart.html">chart</a><ul class='methods'><li data-type='method'><a href="module-chart.html#.registerFont">registerFont</a></li><li data-type='method'><a href="module-chart.html#.runInGBox">runInGBox</a></li></ul></li><li><a href="module-crypto.html">crypto</a><ul class='methods'><li data-type='method'><a href="module-crypto.html#.CRC32">CRC32</a></li><li data-type='method'><a href="module-crypto.html#.MD5">MD5</a></li><li data-type='method'><a href="module-crypto.html#.SHA2">SHA2</a></li><li data-type='method'><a href="module-crypto.html#.SHA3">SHA3</a></li><li data-type='method'><a href="module-crypto.html#.decrypt">decrypt</a></li><li data-type='method'><a href="module-crypto.html#.encrypt">encrypt</a></li><li data-type='method'><a href="module-crypto.html#.generateSecureRandomString">generateSecureRandomString</a></li><li data-type='method'><a href="module-crypto.html#.hashPassword">hashPassword</a></li><li data-type='method'><a href="module-crypto.html#.hmacSha256Encrypt">hmacSha256Encrypt</a></li><li data-type='method'><a href="module-crypto.html#.hmacSha256Verify">hmacSha256Verify</a></li><li data-type='method'><a href="module-crypto.html#.verifyPassword">verifyPassword</a></li></ul></li><li><a href="module-dashboard.html">dashboard</a><ul class='methods'><li data-type='method'><a href="module-dashboard.html#.init">init</a></li></ul></li><li><a href="module-db.html">db</a><ul class='methods'><li data-type='method'><a href="module-db.html#.execute">execute</a></li><li data-type='method'><a href="module-db.html#.query">query</a></li><li data-type='method'><a href="module-db.html#.transaction">transaction</a></li></ul></li><li><a href="module-encode.html">encode</a></li><li><a href="module-formdata.html">formdata</a><ul class='methods'><li data-type='method'><a href="module-formdata.html#.create">create</a></li></ul></li><li><a href="module-fs.html">fs</a><ul class='methods'><li data-type='method'><a href="module-fs.html#.appendFile">appendFile</a></li><li data-type='method'><a href="module-fs.html#.appendFileSync">appendFileSync</a></li><li data-type='method'><a href="module-fs.html#.copyDir">copyDir</a></li><li data-type='method'><a href="module-fs.html#.copyDirSync">copyDirSync</a></li><li data-type='method'><a href="module-fs.html#.copyFile">copyFile</a></li><li data-type='method'><a href="module-fs.html#.copyFileSync">copyFileSync</a></li><li data-type='method'><a href="module-fs.html#.deleteFile">deleteFile</a></li><li data-type='method'><a href="module-fs.html#.deleteFileSync">deleteFileSync</a></li><li data-type='method'><a href="module-fs.html#.exists">exists</a></li><li data-type='method'><a href="module-fs.html#.existsSync">existsSync</a></li><li data-type='method'><a href="module-fs.html#.mkdir">mkdir</a></li><li data-type='method'><a href="module-fs.html#.mkdirSync">mkdirSync</a></li><li data-type='method'><a href="module-fs.html#.moveDir">moveDir</a></li><li data-type='method'><a href="module-fs.html#.moveDirSync">moveDirSync</a></li><li data-type='method'><a href="module-fs.html#.moveFile">moveFile</a></li><li data-type='method'><a href="module-fs.html#.moveFileSync">moveFileSync</a></li><li data-type='method'><a href="module-fs.html#.readFile">readFile</a></li><li data-type='method'><a href="module-fs.html#.readFileSync">readFileSync</a></li><li data-type='method'><a href="module-fs.html#.readJSONSync">readJSONSync</a></li><li data-type='method'><a href="module-fs.html#.rmdir">rmdir</a></li><li data-type='method'><a href="module-fs.html#.rmdirSync">rmdirSync</a></li><li data-type='method'><a href="module-fs.html#.writeFile">writeFile</a></li><li data-type='method'><a href="module-fs.html#.writeFileSync">writeFileSync</a></li><li data-type='method'><a href="module-fs.html#.writeJSONSync">writeJSONSync</a></li></ul></li><li><a href="module-html.html">html</a><ul class='methods'><li data-type='method'><a href="module-html.html#.fromFile">fromFile</a></li><li data-type='method'><a href="module-html.html#.fromFileSync">fromFileSync</a></li><li data-type='method'><a href="module-html.html#.fromString">fromString</a></li><li data-type='method'><a href="module-html.html#.fromUrl">fromUrl</a></li></ul></li><li><a href="module-httpclient.html">httpclient</a><ul class='methods'><li data-type='method'><a href="module-httpclient.html#.get">get</a></li><li data-type='method'><a href="module-httpclient.html#.post">post</a></li></ul></li><li><a href="module-image.html">image</a><ul class='methods'><li data-type='method'><a href="module-image.html#.loadFromBuffer">loadFromBuffer</a></li><li data-type='method'><a href="module-image.html#.loadFromFile">loadFromFile</a></li></ul></li><li><a href="module-pdf.html">pdf</a><ul class='methods'><li data-type='method'><a href="module-pdf.html#.create">create</a></li></ul></li><li><a href="module-platform.html">platform</a><ul class='methods'><li data-type='method'><a href="module-platform.html#.createAppDirectory">createAppDirectory</a></li><li data-type='method'><a href="module-platform.html#.deleteApp">deleteApp</a></li><li data-type='method'><a href="module-platform.html#.installApp">installApp</a></li><li data-type='method'><a href="module-platform.html#.installFromBackup">installFromBackup</a></li><li data-type='method'><a href="module-platform.html#.listApps">listApps</a></li><li data-type='method'><a href="module-platform.html#.listBackups">listBackups</a></li><li data-type='method'><a href="module-platform.html#.mockRollback">mockRollback</a></li><li data-type='method'><a href="module-platform.html#.mockUpgrade">mockUpgrade</a></li><li data-type='method'><a href="module-platform.html#.packageApp">packageApp</a></li><li data-type='method'><a href="module-platform.html#.readFile">readFile</a></li><li data-type='method'><a href="module-platform.html#.registerNewApp">registerNewApp</a></li><li data-type='method'><a href="module-platform.html#.reloadApp">reloadApp</a></li><li data-type='method'><a href="module-platform.html#.rollbackApp">rollbackApp</a></li><li data-type='method'><a href="module-platform.html#.unzipToApp">unzipToApp</a></li><li data-type='method'><a href="module-platform.html#.upgradeApp">upgradeApp</a></li><li data-type='method'><a href="module-platform.html#.writeFile">writeFile</a></li><li data-type='method'><a href="module-platform.html#.zipApp">zipApp</a></li><li data-type='method'><a href="module-platform.html#~analyzeAppBackup">analyzeAppBackup</a></li><li data-type='method'><a href="module-platform.html#~getAppPermissions">getAppPermissions</a></li><li data-type='method'><a href="module-platform.html#~removeAppPermissions">removeAppPermissions</a></li><li data-type='method'><a href="module-platform.html#~setAppPermissions">setAppPermissions</a></li></ul></li><li><a href="module-qrcode.html">qrcode</a><ul class='methods'><li data-type='method'><a href="module-qrcode.html#.barcode">barcode</a></li><li data-type='method'><a href="module-qrcode.html#.qrcode">qrcode</a></li></ul></li><li><a href="module-utils.html">utils</a></li><li><a href="module-uuid.html">uuid</a><ul class='methods'><li data-type='method'><a href="module-uuid.html#.v4">v4</a></li><li data-type='method'><a href="module-uuid.html#.validate">validate</a></li></ul></li><li><a href="module-zip.html">zip</a><ul class='methods'><li data-type='method'><a href="module-zip.html#.unzip">unzip</a></li><li data-type='method'><a href="module-zip.html#.zip">zip</a></li><li data-type='method'><a href="module-zip.html#.zipToFile">zipToFile</a></li></ul></li></ul><h3>Namespaces</h3><ul><li><a href="module-auth.jwt.html">jwt</a><ul class='methods'><li data-type='method'><a href="module-auth.jwt.html#.create">create</a></li><li data-type='method'><a href="module-auth.jwt.html#.verify">verify</a></li></ul></li><li><a href="module-encode.base58.html">base58</a><ul class='methods'><li data-type='method'><a href="module-encode.base58.html#.decode">decode</a></li><li data-type='method'><a href="module-encode.base58.html#.encode">encode</a></li></ul></li><li><a href="module-encode.base64.html">base64</a><ul class='methods'><li data-type='method'><a href="module-encode.base64.html#.decode">decode</a></li><li data-type='method'><a href="module-encode.base64.html#.decodeUrl">decodeUrl</a></li><li data-type='method'><a href="module-encode.base64.html#.encode">encode</a></li><li data-type='method'><a href="module-encode.base64.html#.encodeUrl">encodeUrl</a></li></ul></li><li><a href="module-encode.hex.html">hex</a><ul class='methods'><li data-type='method'><a href="module-encode.hex.html#.decode">decode</a></li><li data-type='method'><a href="module-encode.hex.html#.encode">encode</a></li></ul></li><li><a href="module-encode.html.html">html</a><ul class='methods'><li data-type='method'><a href="module-encode.html.html#.decode">decode</a></li><li data-type='method'><a href="module-encode.html.html#.encode">encode</a></li></ul></li><li><a href="module-encode.uri.html">uri</a><ul class='methods'><li data-type='method'><a href="module-encode.uri.html#.decode">decode</a></li><li data-type='method'><a href="module-encode.uri.html#.encode">encode</a></li></ul></li><li><a href="module-utils.misc.html">misc</a><ul class='methods'><li data-type='method'><a href="module-utils.misc.html#.clamp">clamp</a></li><li data-type='method'><a href="module-utils.misc.html#.groupBy">groupBy</a></li></ul></li><li><a href="module-utils.rnd.html">rnd</a><ul class='methods'><li data-type='method'><a href="module-utils.rnd.html#.bool">bool</a></li><li data-type='method'><a href="module-utils.rnd.html#.choice">choice</a></li><li data-type='method'><a href="module-utils.rnd.html#.color">color</a></li><li data-type='method'><a href="module-utils.rnd.html#.float">float</a></li><li data-type='method'><a href="module-utils.rnd.html#.floatInRange">floatInRange</a></li><li data-type='method'><a href="module-utils.rnd.html#.int">int</a></li><li data-type='method'><a href="module-utils.rnd.html#.intInRange">intInRange</a></li><li data-type='method'><a href="module-utils.rnd.html#.shuffle">shuffle</a></li><li data-type='method'><a href="module-utils.rnd.html#.string">string</a></li></ul></li><li><a href="module-utils.string.html">string</a><ul class='methods'><li data-type='method'><a href="module-utils.string.html#.capitalize">capitalize</a></li><li data-type='method'><a href="module-utils.string.html#.slugify">slugify</a></li><li data-type='method'><a href="module-utils.string.html#.stripHtml">stripHtml</a></li><li data-type='method'><a href="module-utils.string.html#.truncate">truncate</a></li></ul></li></ul>
</nav>
<div id="main">
<h1 class="page-title">formdata</h1>
<section>
<header>
</header>
<article>
<div class="container-overview">
<div class="description usertext">Provides a factory function to create FormData instances.This module is used to handle form data in HTTP requests, allowing for easy construction of multipart/form-data requests.It simplifies the process of appending fields and files to the form data, and provides a method to get headers for use with HTTP clients.It is particularly useful for uploading files and sending complex data structures in web applications.It abstracts the complexities of constructing multipart requests, making it easier to work with file uploads and form submissions.</div>
<dl class="details">
<dt class="tag-description">Description:</dt>
<dd class="tag-description"><ul class="dummy"><li>Provides a factory function to create FormData instances.This module is used to handle form data in HTTP requests, allowing for easy construction of multipart/form-data requests.It simplifies the process of appending fields and files to the form data, and provides a method to get headers for use with HTTP clients.It is particularly useful for uploading files and sending complex data structures in web applications.It abstracts the complexities of constructing multipart requests, making it easier to work with file uploads and form submissions.</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id=".create"><span class="type-signature type-signature-static">(static) </span>create<span class="signature">()</span><span class="type-signature"> → {FormData}</span></h4>
<dl class="details">
<dt class="tag-description">Description:</dt>
<dd class="tag-description"><ul class="dummy"><li>Creates a new FormData instance.This function initializes a FormData object that can be used to append fields and files for HTTP requests.It provides a simple interface for constructing multipart/form-data requests, which is commonly used for file uploads and form submissions.It allows developers to easily add data to the form, including text fields and binary files,and retrieve the necessary headers for sending the form data in HTTP requests.</li></ul></dd>
</dl>
<h5 class="h5-examples">Example</h5>
<pre class="prettyprint"><code>const form = formdata.create();form.append('name', 'Gingee App Server');form.append('description', 'This is the Gingee mascot.');form.append('image', fs.readFileSync(fs.BOX, './images/gingee.png'), 'gingee.png');const headers = form.getHeaders();</code></pre>
<h5 class="h5-returns">Returns:</h5>
<div class="param-desc">
A new FormData instance.
</div>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">FormData</span>
</dd>
</dl>
</article>
</section>
</div>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.4</a> on Tue Sep 16 2025 13:47:01 GMT+0530 (India Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>
<script>prettyPrint();</script>
<script src="scripts/polyfill.js"></script>
<script src="scripts/linenumber.js"></script>
</body>
</html>