Changes for page WOFileUpload

Last modified by David Holt on 2012/01/30 22:18

From version 20.1
edited by Pascal Robert
on 2011/04/26 18:47
Change comment: There is no comment for this version
To version 21.1
edited by Gavin Eadie
on 2011/04/27 09:52
Change comment: minor typos while exploring new entries ..

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.probert
1 +XWiki.gavineadie
Content
... ... @@ -2,15 +2,24 @@
2 2  
3 3  = Introduction =
4 4  
5 -The **WOFileUpload** element allow you to add a <input type=file> HTML element into your form, hence letting your users to upload files to your server. This element must be inside a HTML form ([[WOForm]]) element and the //enctype// binding of the form must be set to "multipart/form-data" (see the examples).
5 +The **WOFileUpload** element allows you to add an <input type=file> HTML element into your form, hence letting your users upload files to your server. This element must be inside an HTML form ([[WOForm]]) element and the //enctype// binding of the form must be set to "multipart/form-data" (see the examples).
6 6  
7 -Starting with WebObjects 5.2, it's now possible to stream file uploads so that the entire file is not stored in memory on the server while being uploaded.
7 +Starting with WebObjects 5.2, it is possible to stream file uploads so that the entire file is not stored in memory on the server while being uploaded.
8 8  
9 9  = Usage =
10 10  
11 11  {{code}}
12 12  
13 -WOFileUpload { filePath=aPath; data=fileData; [inputStream=fileName]; [bufferSize=sizeKB]; [outputStream=fileName]; [streamToFilePath=filePath]; [overwrite=[boolean]]; [finalFilePath=filePath];}
13 +WOFileUpload {
14 + filePath=aPath;
15 + data=fileData;
16 + [inputStream=fileName];
17 + [bufferSize=sizeKB];
18 + [outputStream=fileName];
19 + [streamToFilePath=filePath];
20 + [overwrite=[boolean]];
21 + [finalFilePath=filePath];
22 +}
14 14  
15 15  {{/code}}
16 16  
... ... @@ -46,7 +46,12 @@
46 46  {{code}}
47 47  
48 48  <wo:form enctype = "multipart/form-data">
49 -<wo:fileUpload streamToFilePath="$streamPathLocation" overwrite="true" filePath="$clientFilePath" finalFilePath="$finalFilePath" />
58 +
59 + <wo:fileUpload streamToFilePath="$streamPathLocation"
60 + overwrite="true"
61 + filePath="$clientFilePath"
62 + finalFilePath="$finalFilePath" />
63 +
50 50  </wo:form>
51 51  
52 52  {{/code}}
... ... @@ -53,6 +53,8 @@
53 53  
54 54  = Related documents =
55 55  
70 +[[ERXWOFileUpload>>http://webobjects.mdimension.com/hudson/job/Wonder/javadoc/er/extensions/components/_private/ERXWOFileUpload.html]]
71 +[[AjaxFileUpload>>http://webobjects.mdimension.com/hudson/job/Wonder/javadoc/er/ajax/AjaxFileUpload.html]]
56 56  [[ERAttachment>>WONDER:ERAttachment Framework]]
57 57  [[Database vs Filesystem>>WO:Development-Database vs Filesystem]]
58 58  [[Localization and Internationalization>>WO:Development-Localization and Internationalization]]