Hi all...
I'm trying to implement a webpage with an upload file option. I have
visited http://wiki.cocoondev.org/Wiki.jsp?page=FileUploadsWithFlow,
and I have found some info about "FileUploadsWithFlow".
First step is related to add the uploado option:
<html>
<form action="/upload" method="POST" enctype="multipart/form-data">
<input type="file" name="blah"/>
<input type="submit" name="action" value="Upload"/>
</form>
</html>
The second step is:
<map:match pattern="/upload">
<map:call function="upload"/>
</map:match>
But I don't undersand the third step:
var role = Packages.org.mystuff.UploadManager.ROLE;
function upload() {
var uploader = cocoon.componentManager.getComponent(role);
var part = cocoon.request.get("blah");
var success = uploader.handle(part.getInputStream());
if (success) {
sendPage("success.html");
} else {
sendPage("failure.html");
}
}
Where do I have to write this code???
No more things to do? Only these three steps? Do I have to add
<map:flow> into sitemap???
Thanks a lot
Josep Riudavets
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]