[Seaside] saving & uploading files?
Wed, 28 Aug 2002 22:20:34 +0200
I have used file upload with version 0.93 of Seaside. I don't know if=20
is still valid. Julian please correct me if I am wrong.
I hope I will soon be able to try version 0.94 or version 2 when it will=20=
To use file upload, you need to make a component:
IAComponent subclass: #AFiUploadFilePage
instanceVariableNames: 'uploadFile '
^ '<form action=3D"@upload" enctype=3D"multipart/form-data">
<input type=3D"file" name=3D"@uploadFile" size=3D"80"><br>=
<input type=3D"submit" value=3D"Send file">
"Here do what you want with:
The bad things is that the fileName returned is fully dependant of the=20=
and the plateform used: different kind of path separators, sometime full=20=
sometime only the filename. Ahhhhh the joy of web development ;-)
To get a correct fileName, I used the following (the most current path=20=
(uploadFile fileName findTokens: '/\:') last
which should work on more current cases.
Have a nice day.
Le Mercredi 28 ao=FBt 2002, =E0 06:51 , Tim Rowledge a =E9crit :
> Julian Fitzell <email@example.com> is claimed by the authorities to =
>> Not sure I ever tried using it myself but I think that was how it was
>> supposed to work. Have you had specific problems with it or just
>> wondering where to start?
> The latter; I've no idea what one does to provide for an upload
> field/form/entry/whatever it is.
> And let's not forget the download stuff; the only approach I can think
> of at the moment is to save the info to a file and just return it from
> a new URL. That simply has to be wrong - its so ugly.
> Tim Rowledge, firstname.lastname@example.org, http://sumeru.stanford.edu/tim
> Klingon Code Warrior:- 6) "Our competitors are without honor!"
> Seaside mailing list