File: classWt_1_1WFileUpload.html

package info (click to toggle)
witty 3.1.2-3
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 45,512 kB
  • ctags: 35,832
  • sloc: cpp: 69,469; ansic: 66,945; xml: 4,383; sh: 594; perl: 108; makefile: 106
file content (372 lines) | stat: -rw-r--r-- 29,735 bytes parent folder | download
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
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Wt: Wt::WFileUpload Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="namespaceWt.html">Wt</a>::<a class="el" href="classWt_1_1WFileUpload.html">WFileUpload</a>
  </div>
</div>
<div class="contents">
<h1>Wt::WFileUpload Class Reference</h1><!-- doxytag: class="Wt::WFileUpload" --><!-- doxytag: inherits="Wt::WWebWidget" -->A widget that allows a file to be uploaded.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;Wt/WFileUpload&gt;</code>
<p>
<div class="dynheader">
Inheritance diagram for Wt::WFileUpload:</div>
<div class="dynsection">
<p><center><img src="classWt_1_1WFileUpload__inherit__graph.png" border="0" usemap="#Wt_1_1WFileUpload__inherit__map" alt="Inheritance graph"></center>
<map name="Wt_1_1WFileUpload__inherit__map">
<area shape="rect" href="classWt_1_1WWebWidget.html" title="A base class for widgets with an HTML counterpart." alt="" coords="5,155,128,181"><area shape="rect" href="classWt_1_1WWidget.html" title="The abstract base class for a user&#45;interface component." alt="" coords="19,80,115,107"><area shape="rect" href="classWt_1_1WObject.html" title="A base class for objects that participate in the signal/slot system." alt="" coords="19,5,115,32"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>

<p>
<a href="classWt_1_1WFileUpload-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="71fa85fc383df6e36c2bcf4d877b63ec"></a><!-- doxytag: member="Wt::WFileUpload::WFileUpload" ref="71fa85fc383df6e36c2bcf4d877b63ec" args="(WContainerWidget *parent=0)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFileUpload.html#71fa85fc383df6e36c2bcf4d877b63ec">WFileUpload</a> (<a class="el" href="classWt_1_1WContainerWidget.html">WContainerWidget</a> *parent=0)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a file upload widget. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c7ad1324c86d378da9da9740a631a662"></a><!-- doxytag: member="Wt::WFileUpload::setFileTextSize" ref="c7ad1324c86d378da9da9740a631a662" args="(int chars)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFileUpload.html#c7ad1324c86d378da9da9740a631a662">setFileTextSize</a> (int chars)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the size of the file input. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="39a9998018c87f25d7d884a3a0418cf4"></a><!-- doxytag: member="Wt::WFileUpload::fileTextSize" ref="39a9998018c87f25d7d884a3a0418cf4" args="() const " -->
int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFileUpload.html#39a9998018c87f25d7d884a3a0418cf4">fileTextSize</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the size of the file input. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const std::string &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFileUpload.html#98bff1bc07a5d59086455a45805e43bf">spoolFileName</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the spooled location of the uploaded file.  <a href="#98bff1bc07a5d59086455a45805e43bf"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8fc5e7671594ffd178e0930554e85f15"></a><!-- doxytag: member="Wt::WFileUpload::clientFileName" ref="8fc5e7671594ffd178e0930554e85f15" args="() const " -->
const <a class="el" href="classWt_1_1WString.html">WString</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFileUpload.html#8fc5e7671594ffd178e0930554e85f15">clientFileName</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the client filename. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fc6902cab1ca352a06687f900f2839aa"></a><!-- doxytag: member="Wt::WFileUpload::contentDescription" ref="fc6902cab1ca352a06687f900f2839aa" args="() const " -->
const <a class="el" href="classWt_1_1WString.html">WString</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFileUpload.html#fc6902cab1ca352a06687f900f2839aa">contentDescription</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the client content description. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFileUpload.html#541d634e9f9e546f59417682811f01ef">stealSpooledFile</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Steals the spooled file.  <a href="#541d634e9f9e546f59417682811f01ef"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFileUpload.html#4207ca5ea74962583d146409301c3416">emptyFileName</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Checks if no filename was given and thus no file uploaded.  <a href="#4207ca5ea74962583d146409301c3416"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFileUpload.html#66376fb4668a037760a91abad9f83f8a">canUpload</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns whether <a class="el" href="classWt_1_1WFileUpload.html#c17094f2fd6ae8cac1035161f7d80b9c" title="Starts the file upload.">upload()</a> will start a new file upload.  <a href="#66376fb4668a037760a91abad9f83f8a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFileUpload.html#ba40acced8b3ab758f53d17f15afcf38">isUploaded</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns whether the <a class="el" href="classWt_1_1WFileUpload.html#c17094f2fd6ae8cac1035161f7d80b9c" title="Starts the file upload.">upload()</a> slot will not start a new upload. (<b>Deprecated</b>).  <a href="#ba40acced8b3ab758f53d17f15afcf38"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classWt_1_1EventSignal.html">EventSignal</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFileUpload.html#acb4622c8cd83d1635a8c0db13c8c0fe">uploaded</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Signal emitted when a new file was uploaded.  <a href="#acb4622c8cd83d1635a8c0db13c8c0fe"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classWt_1_1Signal.html">Signal</a>&lt; int &gt; &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFileUpload.html#29dc78a0162c676f7b72904d595440d8">fileTooLarge</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Signal emitted when the user tried to upload a too large file.  <a href="#29dc78a0162c676f7b72904d595440d8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classWt_1_1EventSignal.html">EventSignal</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFileUpload.html#3abaf94bdba04e7833aa18bc7e8d0f40">changed</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Signal emitted when the user selected a new file.  <a href="#3abaf94bdba04e7833aa18bc7e8d0f40"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFileUpload.html#c17094f2fd6ae8cac1035161f7d80b9c">upload</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Starts the file upload.  <a href="#c17094f2fd6ae8cac1035161f7d80b9c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WFileUpload.html#d23982f1823db145b0da23508a7aa7fa">enableAjax</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Progresses to an Ajax-enabled widget.  <a href="#d23982f1823db145b0da23508a7aa7fa"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A widget that allows a file to be uploaded. 
<p>
This widget is displayed as a box in which a filename can be entered and a browse button.<p>
Depending on availability of JavaScript, the behaviour of the widget is different, but the API is designed in a way which facilitates a portable use.<p>
When JavaScript is available, the file will not be uploaded until <a class="el" href="classWt_1_1WFileUpload.html#c17094f2fd6ae8cac1035161f7d80b9c" title="Starts the file upload.">upload()</a> is called. This will start an asynchronous upload (and thus return immediately). When the file has been uploaded, the <a class="el" href="classWt_1_1WFileUpload.html#acb4622c8cd83d1635a8c0db13c8c0fe" title="Signal emitted when a new file was uploaded.">uploaded()</a> signal is emitted, or if the file was too large, the <a class="el" href="classWt_1_1WFileUpload.html#29dc78a0162c676f7b72904d595440d8" title="Signal emitted when the user tried to upload a too large file.">fileTooLarge()</a> signal is emitted.<p>
When no JavaScript is available, the file will be uploaded with the next click event. Thus, <a class="el" href="classWt_1_1WFileUpload.html#c17094f2fd6ae8cac1035161f7d80b9c" title="Starts the file upload.">upload()</a> has no effect -- the file will already be uploaded, and the corresponding signals will already be emitted. To test if <a class="el" href="classWt_1_1WFileUpload.html#c17094f2fd6ae8cac1035161f7d80b9c" title="Starts the file upload.">upload()</a> will start an upload, you may check using the <a class="el" href="classWt_1_1WFileUpload.html#66376fb4668a037760a91abad9f83f8a" title="Returns whether upload() will start a new file upload.">canUpload()</a> call.<p>
Thus, to properly use the widget, one needs to follow these rules: <ul>
<li>
Be prepared to handle the <a class="el" href="classWt_1_1WFileUpload.html#acb4622c8cd83d1635a8c0db13c8c0fe" title="Signal emitted when a new file was uploaded.">uploaded()</a> or <a class="el" href="classWt_1_1WFileUpload.html#29dc78a0162c676f7b72904d595440d8" title="Signal emitted when the user tried to upload a too large file.">fileTooLarge()</a> signals also when <a class="el" href="classWt_1_1WFileUpload.html#c17094f2fd6ae8cac1035161f7d80b9c" title="Starts the file upload.">upload()</a> was not called. </li>
<li>
Check using <a class="el" href="classWt_1_1WFileUpload.html#66376fb4668a037760a91abad9f83f8a" title="Returns whether upload() will start a new file upload.">canUpload()</a> if <a class="el" href="classWt_1_1WFileUpload.html#c17094f2fd6ae8cac1035161f7d80b9c" title="Starts the file upload.">upload()</a> will schedule a new upload. if (!canUpload()) then <a class="el" href="classWt_1_1WFileUpload.html#c17094f2fd6ae8cac1035161f7d80b9c" title="Starts the file upload.">upload()</a> will not have any effect. if (<a class="el" href="classWt_1_1WFileUpload.html#66376fb4668a037760a91abad9f83f8a" title="Returns whether upload() will start a new file upload.">canUpload()</a>), <a class="el" href="classWt_1_1WFileUpload.html#c17094f2fd6ae8cac1035161f7d80b9c" title="Starts the file upload.">upload()</a> will start a new file upload, which completes succesfully using an <a class="el" href="classWt_1_1WFileUpload.html#acb4622c8cd83d1635a8c0db13c8c0fe" title="Signal emitted when a new file was uploaded.">uploaded()</a> signal or a <a class="el" href="classWt_1_1WFileUpload.html#29dc78a0162c676f7b72904d595440d8" title="Signal emitted when the user tried to upload a too large file.">fileTooLarge()</a> signals gets emitted.  </li>
</ul>
<p>
The WFileUpload widget must be hidden or deleted when a file is received. In addition it is wise to prevent the user from uploading the file twice as in the example below.<p>
The uploaded file is automatically spooled to a local temporary file which will be deleted together with the <a class="el" href="classWt_1_1WFileUpload.html" title="A widget that allows a file to be uploaded.">WFileUpload</a> widget, unless <a class="el" href="classWt_1_1WFileUpload.html#541d634e9f9e546f59417682811f01ef" title="Steals the spooled file.">stealSpooledFile()</a> is called.<p>
Usage example: <div class="fragment"><pre class="fragment"> <a class="code" href="classWt_1_1WFileUpload.html" title="A widget that allows a file to be uploaded.">Wt::WFileUpload</a> *<a class="code" href="classWt_1_1WFileUpload.html#c17094f2fd6ae8cac1035161f7d80b9c" title="Starts the file upload.">upload</a> = <span class="keyword">new</span> <a class="code" href="classWt_1_1WFileUpload.html" title="A widget that allows a file to be uploaded.">Wt::WFileUpload</a>(<span class="keyword">this</span>);
 upload-&gt;<a class="code" href="classWt_1_1WFileUpload.html#c7ad1324c86d378da9da9740a631a662" title="Sets the size of the file input.">setFileTextSize</a>(40);

 <span class="comment">// Provide a button</span>
 <a class="code" href="classWt_1_1WPushButton.html" title="A widget that represents a push button.">Wt::WPushButton</a> *uploadButton = <span class="keyword">new</span> <a class="code" href="classWt_1_1WPushButton.html" title="A widget that represents a push button.">Wt::WPushButton</a>(<span class="stringliteral">"Send"</span>, <span class="keyword">this</span>);

 <span class="comment">// Upload when the button is clicked.</span>
 uploadButton-&gt;<a class="code" href="classWt_1_1WInteractWidget.html#e11e050cce0d4a8f742afa3ef92bfe8c" title="Event signal emitted when a mouse key was clicked on this widget.">clicked</a>().connect(SLOT(upload, <a class="code" href="classWt_1_1WFileUpload.html#c17094f2fd6ae8cac1035161f7d80b9c" title="Starts the file upload.">Wt::WFileUpload::upload</a>));
 uploadButton-&gt;<a class="code" href="classWt_1_1WInteractWidget.html#e11e050cce0d4a8f742afa3ef92bfe8c" title="Event signal emitted when a mouse key was clicked on this widget.">clicked</a>().connect(SLOT(uploadButton, <a class="code" href="classWt_1_1WWidget.html#5f68ea0ab29adfb8e559153fca281e03" title="Disable thes widget.">Wt::WPushButton::disable</a>));

 <span class="comment">// Upload automatically when the user entered a file.</span>
 upload-&gt;<a class="code" href="classWt_1_1WFileUpload.html#3abaf94bdba04e7833aa18bc7e8d0f40" title="Signal emitted when the user selected a new file.">changed</a>().connect(SLOT(upload, <a class="code" href="classWt_1_1WFileUpload.html#c17094f2fd6ae8cac1035161f7d80b9c" title="Starts the file upload.">WFileUpload::upload</a>));
 upload-&gt;<a class="code" href="classWt_1_1WFileUpload.html#3abaf94bdba04e7833aa18bc7e8d0f40" title="Signal emitted when the user selected a new file.">changed</a>().connect(SLOT(uploadButton, <a class="code" href="classWt_1_1WWidget.html#5f68ea0ab29adfb8e559153fca281e03" title="Disable thes widget.">Wt::WPushButton::disable</a>));

 <span class="comment">// React to a succesfull upload.</span>
 upload-&gt;<a class="code" href="classWt_1_1WFileUpload.html#acb4622c8cd83d1635a8c0db13c8c0fe" title="Signal emitted when a new file was uploaded.">uploaded</a>().connect(SLOT(<span class="keyword">this</span>, MyWidget::fileUploaded));

 <span class="comment">// React to a fileupload problem.</span>
 upload-&gt;<a class="code" href="classWt_1_1WFileUpload.html#29dc78a0162c676f7b72904d595440d8" title="Signal emitted when the user tried to upload a too large file.">fileTooLarge</a>().connect(SLOT(<span class="keyword">this</span>, MyWidget::fileTooLarge));
</pre></div><p>
WFileUpload is an <a class="el" href="classWt_1_1WWidget.html#c78e3af143883334c82031790c87416e">inline </a> widget.<p>
<h3>CSS</h3>
<p>
The file upload itself corresponds to a <code>&lt;input type="file"&gt;</code> tag, but may be wrapped in a <code>&lt;form&gt;</code> tag. This widget does not provide styling, and styling through CSS is not well supported across browsers. <hr><h2>Member Function Documentation</h2>
<a class="anchor" name="98bff1bc07a5d59086455a45805e43bf"></a><!-- doxytag: member="Wt::WFileUpload::spoolFileName" ref="98bff1bc07a5d59086455a45805e43bf" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const std::string&amp; Wt::WFileUpload::spoolFileName           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the spooled location of the uploaded file. 
<p>
Returns the temporary filename in which the uploaded file was spooled. The file is guaranteed to exist as long as the <a class="el" href="classWt_1_1WFileUpload.html" title="A widget that allows a file to be uploaded.">WFileUpload</a> widget is not deleted, or a new file is not uploaded.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WFileUpload.html#541d634e9f9e546f59417682811f01ef" title="Steals the spooled file.">stealSpooledFile()</a> <p>
<a class="el" href="classWt_1_1WFileUpload.html#acb4622c8cd83d1635a8c0db13c8c0fe" title="Signal emitted when a new file was uploaded.">uploaded</a> </dd></dl>

</div>
</div><p>
<a class="anchor" name="541d634e9f9e546f59417682811f01ef"></a><!-- doxytag: member="Wt::WFileUpload::stealSpooledFile" ref="541d634e9f9e546f59417682811f01ef" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::WFileUpload::stealSpooledFile           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Steals the spooled file. 
<p>
By stealing the file, the spooled file will no longer be deleted together with this widget, which means you need to take care of managing that. 
</div>
</div><p>
<a class="anchor" name="4207ca5ea74962583d146409301c3416"></a><!-- doxytag: member="Wt::WFileUpload::emptyFileName" ref="4207ca5ea74962583d146409301c3416" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Wt::WFileUpload::emptyFileName           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Checks if no filename was given and thus no file uploaded. 
<p>
Return whether a non-empty filename was given. 
</div>
</div><p>
<a class="anchor" name="66376fb4668a037760a91abad9f83f8a"></a><!-- doxytag: member="Wt::WFileUpload::canUpload" ref="66376fb4668a037760a91abad9f83f8a" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Wt::WFileUpload::canUpload           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns whether <a class="el" href="classWt_1_1WFileUpload.html#c17094f2fd6ae8cac1035161f7d80b9c" title="Starts the file upload.">upload()</a> will start a new file upload. 
<p>
A call to <a class="el" href="classWt_1_1WFileUpload.html#c17094f2fd6ae8cac1035161f7d80b9c" title="Starts the file upload.">upload()</a> will only start a new file upload if there is no JavaScript support. Otherwise, the most recent file will already be uploaded.<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>This method was renamed, and its result inverted, from the now deprecated method <a class="el" href="classWt_1_1WFileUpload.html#ba40acced8b3ab758f53d17f15afcf38" title="Returns whether the upload() slot will not start a new upload. (Deprecated).">isUploaded()</a> </dd></dl>

</div>
</div><p>
<a class="anchor" name="ba40acced8b3ab758f53d17f15afcf38"></a><!-- doxytag: member="Wt::WFileUpload::isUploaded" ref="ba40acced8b3ab758f53d17f15afcf38" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Wt::WFileUpload::isUploaded           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns whether the <a class="el" href="classWt_1_1WFileUpload.html#c17094f2fd6ae8cac1035161f7d80b9c" title="Starts the file upload.">upload()</a> slot will not start a new upload. (<b>Deprecated</b>). 
<p>
<dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000018">Deprecated:</a></b></dt><dd>use <a class="el" href="classWt_1_1WFileUpload.html#66376fb4668a037760a91abad9f83f8a" title="Returns whether upload() will start a new file upload.">canUpload()</a> instead -- <a class="el" href="classWt_1_1WFileUpload.html#66376fb4668a037760a91abad9f83f8a" title="Returns whether upload() will start a new file upload.">canUpload()</a> == !isUploaded(). the name was confusing. </dd></dl>

</div>
</div><p>
<a class="anchor" name="acb4622c8cd83d1635a8c0db13c8c0fe"></a><!-- doxytag: member="Wt::WFileUpload::uploaded" ref="acb4622c8cd83d1635a8c0db13c8c0fe" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1EventSignal.html">EventSignal</a> &amp; Wt::WFileUpload::uploaded           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Signal emitted when a new file was uploaded. 
<p>
This signal is emitted when a new file has been received. It is good practice to hide or delete the <a class="el" href="classWt_1_1WFileUpload.html" title="A widget that allows a file to be uploaded.">WFileUpload</a> widget when a file has been uploaded succesfully.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WFileUpload.html#c17094f2fd6ae8cac1035161f7d80b9c" title="Starts the file upload.">upload()</a> <p>
<a class="el" href="classWt_1_1WFileUpload.html#29dc78a0162c676f7b72904d595440d8" title="Signal emitted when the user tried to upload a too large file.">fileTooLarge()</a> </dd></dl>

</div>
</div><p>
<a class="anchor" name="29dc78a0162c676f7b72904d595440d8"></a><!-- doxytag: member="Wt::WFileUpload::fileTooLarge" ref="29dc78a0162c676f7b72904d595440d8" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1Signal.html">Signal</a>&lt;int&gt;&amp; Wt::WFileUpload::fileTooLarge           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Signal emitted when the user tried to upload a too large file. 
<p>
The parameter is the approximate size of the file the user tried to upload.<p>
The maximum file size is determined by the maximum request size, which may be configured in the configuration file (&lt;max-request-size&gt;).<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WFileUpload.html#acb4622c8cd83d1635a8c0db13c8c0fe" title="Signal emitted when a new file was uploaded.">uploaded()</a> <p>
<a class="el" href="classWt_1_1WApplication.html#ef3a8fa2a7825ed7439707d8a90b08aa" title="Signal which indicates that too a large request was received.">WApplication::requestTooLarge()</a> </dd></dl>

</div>
</div><p>
<a class="anchor" name="3abaf94bdba04e7833aa18bc7e8d0f40"></a><!-- doxytag: member="Wt::WFileUpload::changed" ref="3abaf94bdba04e7833aa18bc7e8d0f40" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1EventSignal.html">EventSignal</a> &amp; Wt::WFileUpload::changed           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Signal emitted when the user selected a new file. 
<p>
One could react on the user selecting a (new) file, by uploading the file immediately.<p>
Caveat: this signal is not emitted with konqueror and possibly other browsers. Thus, in the above scenario you should still provide an alternative way to call the <a class="el" href="classWt_1_1WFileUpload.html#c17094f2fd6ae8cac1035161f7d80b9c" title="Starts the file upload.">upload()</a> method. 
</div>
</div><p>
<a class="anchor" name="c17094f2fd6ae8cac1035161f7d80b9c"></a><!-- doxytag: member="Wt::WFileUpload::upload" ref="c17094f2fd6ae8cac1035161f7d80b9c" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::WFileUpload::upload           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Starts the file upload. 
<p>
The <a class="el" href="classWt_1_1WFileUpload.html#acb4622c8cd83d1635a8c0db13c8c0fe" title="Signal emitted when a new file was uploaded.">uploaded()</a> signal is emitted when a file is uploaded, or the <a class="el" href="classWt_1_1WFileUpload.html#29dc78a0162c676f7b72904d595440d8" title="Signal emitted when the user tried to upload a too large file.">fileTooLarge()</a> signal is emitted when the file size exceeded the maximum request size.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WFileUpload.html#acb4622c8cd83d1635a8c0db13c8c0fe" title="Signal emitted when a new file was uploaded.">uploaded()</a> <p>
<a class="el" href="classWt_1_1WFileUpload.html#66376fb4668a037760a91abad9f83f8a" title="Returns whether upload() will start a new file upload.">canUpload()</a> </dd></dl>

</div>
</div><p>
<a class="anchor" name="d23982f1823db145b0da23508a7aa7fa"></a><!-- doxytag: member="Wt::WFileUpload::enableAjax" ref="d23982f1823db145b0da23508a7aa7fa" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::WFileUpload::enableAjax           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Progresses to an Ajax-enabled widget. 
<p>
This method is called when the progressive bootstrap method is used, and support for AJAX has been detected. The default behavior will upgrade the widget's event handling to use AJAX instead of full page reloads, and propagate the call to its children.<p>
You may want to reimplement this method if you want to make changes to widget when AJAX is enabled. You should always call the base implementation.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WApplication.html#78016406c4746c56b2c2ffce7c5e181f" title="Progresses to an Ajax-enabled user interface.">WApplication::enableAjax()</a> </dd></dl>

<p>Reimplemented from <a class="el" href="classWt_1_1WWebWidget.html#2893433f4aa1d6775875f1ebddd7c5ba">Wt::WWebWidget</a>.</p>

</div>
</div><p>
</div>
<hr size="1"><address style="align: right;"><small>
Generated on Fri Mar 26 17:12:07 2010 for <a href="http://www.webtoolkit.eu/wt/">Wt</a> by&nbsp;<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6</small></address>
</body>
</html>