[Seaside] Re: Uploading an Image

John Thornborrow john at pinesoft.co.uk
Fri Apr 20 11:47:55 UTC 2007


Peter Osburg wrote:
> well just to give another suggestion:
> i don't feel well with adding all needed pictures to the image
> especially when creating a webproject and using hundreds of several
>
> pictures. therefore i would advice to use a static folder on your
> webspace and referencing to the images just by using the url.
>
> think of seasidehosting.st <http://seasidehosting.st>! they provide you with a folder for your image and
>
> also an resources folder for all the static stuff. you also do very well with
> that solution.
>
> regards
> Peter
>
> Michel Bany schrieb:
>   
>>
>> >
>> > On 20 Apr 2007, at 12:37 , John Thornborrow wrote:
>> >
>>     
>>> >> dirk newbold wrote:
>>>       
>>>> >>> Sorry,
>>>>
>>>> >>>
>>>> >>> Just to display an image in a webpage originally generated by a html
>>>> >>> file but now in Seaside (renderContentOn: html).
>>>>
>>>> >>>
>>>> >>> e.g. the image is located at:
>>>> >>> c:\Program Files\Cincom\vw7.4.1nc\web\examples
>>>>
>>>> >>>
>>>> >>> With html and having the image located in the same dir as the html
>>>> >>> 
>>>> file I used:
>>>> >>> <img src="memberMail.gif" alt="Email Member"/>
>>>> >>> Which displayed the image in web page generated by that html file.
>>>>
>>>> >>>
>>>>         
>> >
>> > This should work
>> >
>>
>> >     html image url: '../memberMail.gif'
>> >
>> > Note that this only works because you placed your image in this
>>
>> > specific directory.
>> > In any event, John's suggestion (i.e. keeping your app graphics in
>> > your VW image) is probably the most appropriate.
>>
>> > Enjoy,
>> > Michel.
>> >
>> >
>>
>> >
>>     
>>> >> Hi,
>>> >>
>>> >> I recently learned about this myself  - have a look at the WAFileLibrary
>>>
>>> >> class, and the example class WAFileLibraryDemo and WAFileLibraryExample.
>>> >>
>>> >> 
>>> HTH,
>>> >> John.
>>> >>
>>>       
>> >
>> > _______________________________________________
>> > Seaside mailing list
>>
>> > Seaside at lists.squeakfoundation.org
>> > 
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>> >
>>     
>   
>
>
> Click here
> <https://www.mailcontrol.com/sr/wQw0zmjPoHdJTZGyOCrrhg==>
> to report this email as spam.
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>   
Another option is to stream the file from disk; this is a simple example
of what I have in my WAFileLibrary subclass:

logoGif
    | stream content |
    stream _ StandardFileReader new open: 'c:\somepath\logo.gif'
forWrite: false.
    content _ stream contents.
    stream close.
    ^content


More information about the seaside mailing list