[Seaside] Suggestion: WAFile subclass: #WAImage for image uploads
dima-sender-3c337a at yasp.com
Wed Mar 23 16:50:46 CET 2005
Avi Bryant wrote:
> On Wed, 23 Mar 2005 09:19:59 -0500, Bany, Michel <mbany at cincom.com> wrote:
>>In the VisualWorks port, an instance of WAFile is created
>>when the HTTP request includes a MIME part. This happens
>>at a very early stage while parsing the HTTP request
>>so that proper WAxxx objects are made available to
>>Do you think we should create a WAImage object wherever
>>appropriate this early in the process ? This would imply
>>parsing every file. I think it would be enough to convert
>>WAFile objects into WAImage as needed.
>> html fileUploadWithCallback:
>> [:f| [image := f asImage ...] on: NotAnImage do: [:e | ]
> It should certainly only happen when requested - I think the original
> suggestion was to have a specific #imageUploadWithCallback method,
> whose implementation would probably look very much like the above.
My expirience is that web developer is always know, if he want to get an image
from the user. Another common filetype is PDF file. Now MS Office documents are become
popular aslo :-( but serious sites still use PDF for Specs and press releases.
Admin interfaces for web sites usually have entries 'Upload big product image: ....'
'Upload thumbnail image: ....'
'Upload product specification in PDF: .....'
looks for me as natural things to have in Seaside.
WAImage class could have methods to detect if uploaded
file is image in case someone would like to detect images after
he used #fileUploadWithCallback. But that is not important for me.
I will be happy with #imageUploadWithCallback :-)
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
More information about the Seaside