[Seaside] How to make an upload page

Alain Fischer alain.fischer@bluewin.ch
Fri, 22 Mar 2002 17:46:24 +0100

Hello all,

Thanks to Avi for having done this quite impressive framework

I finally have found time to try Seaside and the first impression is 
quite good.
I have tried to develop a small application with Seaside and with 
The result is that just with the tutorial and some information from the 
list I was able to develop more rapidly with Seaside.

But now I am stopped since a few hours trying to make a page to upload a 
from a client  to the server without result. I know this must be 
possible because
this is doable with Swiki.

Here is my component:

IAComponent subclass: #TLAdministration
	instanceVariableNames: 'inputValue '
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Tilulu'


	^ '
	<a href="@home">Home</a>
	<h3>Upload File</h3>
	inputValue: [inputValue]
	<form action="@test" enctype="multipart/form-data">
		<input type="text" name="@inputValue" size="80"><br>
		<input type="file" name="@filestuff" size="80"><br>
		<input type="submit" value="Send">

	self callPage: (TLInstrumentList new)


	^ self


	self error

The text input work well but I don' know how to have access to the file 
in the input box nor I know how to have access to the data of the file.
I have tried to put the atribute name="@filestuff" but the method with 
corresponding name is never called. I think that I miss something
very basic but I don't figure out what.

With WebObject there is a WOFileUplod component with two binding: 
filePath and data
and this kind of operation is quite easy except that the filePath is 
dependent of the browser.

Any bits of information is welcome.