[Seaside] uploads.. how?

Ragnar Hojland Espinosa seaside@lists.squeakfoundation.org
Mon, 30 Sep 2002 18:09:20 +0200


On Mon, Sep 30, 2002 at 05:53:22PM +0200, Alain Fischer wrote:

Unfortunately that doesn't help, I get the same error.. which is what I
would expect as I already tried what you write verbatim from an older post
of yours :)  What am I missing?


> Hi Ragnar,
> 
> To use file upload, you need to make a component:
> 
> IAComponent subclass: #AFiUploadFilePage
> 	instanceVariableNames: 'uploadFile '
> 	classVariableNames: ''
> 	poolDictionaries: ''
> 	category: ''
> 
> html
> 	^ '<form action="@upload" enctype="multipart/form-data">
> 		<input type="file" name="@uploadFile" size="80"><br>
> 		<input type="submit" value="Send file">
> 	</form>'
> 
> upload
> 	"Here do what you want with:
> 	uploadFile fileName
> 	uploadFile contents"
> 
> The bad things is that the fileName returned is fully dependant of the 
> browser
> and the plateform used: different kind of path separators, sometime full 
> path,
> sometime only the filename. Ahhhhh the joy of web development ;-)
> 
> To get a correct fileName, I used the following (the most current path 
> separators):
> 	(uploadFile fileName findTokens: '/\:') last
> which should work on more current cases.
> 
> Have a nice day.
> Alain
> 
> 
> 
> Le Lundi 30 septembre 2002, ? 02:04 , Ragnar Hojland Espinosa a ?crit :
> 
> >Another seaside 0.94 day, another question :/
> >
> >html
> >    ^ #(html (form sea:id: add enctype: 'multipart/form-data'
> >    	  (input type: file name '@file')
> >	  (input type: submit)
> >    ))
> >
> >but it compains that:
> >
> >    IAFile(Object)>>doesNotUnderstand:
> >
> >       self an IAFile
> >          aMessage a Message with selector: #isEmpty and arguments: #()
> >
> >I'v read past threads, and I'm under the impression that uploads were
> >included in 0.94.. so what am I doing wrong?
> >--
> >Ragnar Hojland - Project Manager
> >Linalco "Especialistas Linux y en Software Libre"
> >Tel: +34-91-5970074 Fax: +34-91-5970083
> >_______________________________________________
> >Seaside mailing list
> >Seaside@lists.squeakfoundation.org
> >http://lists.squeakfoundation.org/listinfo/seaside
> >
> 
> _______________________________________________
> Seaside mailing list
> Seaside@lists.squeakfoundation.org
> http://lists.squeakfoundation.org/listinfo/seaside
-- 
Ragnar Hojland - Project Manager
Linalco "Especialistas Linux y en Software Libre"
Tel: +34-91-5970074 Fax: +34-91-5970083