[Seaside] serve jpg image files from form objects
Martin Schubert
mtin79 at googlemail.com
Wed May 31 22:19:55 UTC 2006
hey boris,
thanks for your answer and code example.
i am not clearly about if you just provide a link to the file or if
you get it rendered to the website.
especially the message : 'self pngImageByte' ! does it return a
ByteArray?
> WADocumentHandler
> document: self pngImageBytes
> mimeType: 'image/png'
> fileName: 'image.png') response
because thats what i thought the message : 'aForm bits asByteArray'
is doing :
>> html imageWithDocument: aForm bits asByteArray
>> mimeType: 'image/jpeg'
>> fileName: root name,'Picture', '.jpg'.
does anyone know how these methods are meant to be used? or is there
some strange conversion problem from Form -> bits -> asByteArray?
best
martin
i want the jpeg file (hold in a instance variable of type form) to be
RENDERED. not only a link to the data.
Am 31.05.2006 um 22:38 schrieb Boris Popov:
> Here's what I did to serve PNG files from VisualWorks,
>
> (html anchor)
> attributeAt: 'rel' put: 'lightbox';
> callback: [self session
> returnResponse: (WADocumentHandler
> document: self pngImageBytes
> mimeType: 'image/png'
> fileName: 'image.png') response];
> with: [(html image)
> style: 'border: none; padding: 0px;';
> url: (self pictures addToPath: 'view.png');
> altText: 'View']
>
> Hope this helps,
>
> -Boris
>
> --
> +1.604.689.0322
> DeepCove Labs Ltd.
> 4th floor 595 Howe Street
> Vancouver, Canada V6C 2T5
>
> boris at deepcovelabs.com
>
> CONFIDENTIALITY NOTICE
>
> This email is intended only for the persons named in the message
> header. Unless otherwise indicated, it contains information that is
> private and confidential. If you have received it in error, please
> notify the sender and delete the entire message including any
> attachments.
>
> Thank you.
>
> -----Original Message-----
> From: seaside-bounces at lists.squeakfoundation.org
> [mailto:seaside-bounces at lists.squeakfoundation.org] On Behalf Of
> Martin
> Schubert
> Sent: Wednesday, May 31, 2006 12:30 PM
> To: seaside at lists.squeakfoundation.org
> Subject: [Seaside] serve jpg image files from form objects
>
> hello out there,
> allthough i browsed throught the archives i couldn`t find the answer
> to my problem.
>
> i want to serve a jpg-file which is stored in a Form object.
> so i do : aForm _ (Form fromFileNamed: 'wave.jpg')
>
> then i tried the following inside the #renderContentOn: method :
>
> html imageWithDocument: aForm bits asByteArray
> mimeType: 'image/jpeg'
> fileName: root name,'Picture', '.jpg'.
>
> this doesn`t work, and when i am acceptin the following, seaside
> seems to convert the jpg file to gif or wracks up the picture file
> somehow :
>
> html imageWithDocument: aForm
> mimeType: 'image/jpeg'
> fileName: root name,'Picture', '.jpg'.
>
> anybodys having some experience with this issue?
> thanks for help!
>
> martin
>
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20060601/6246bdb7/attachment.htm
More information about the Seaside
mailing list