Search code examples
imagefile-uploadseaside

Seaside: URL to image on server


I created an upload form for images, which works properly and saves files in Contents/Resources/uploads.

I now want to display those images in my web app: how do I retrieve the URL?


Solution

  • To display a Seaside image, you'd use...

    html url: <some image resource>
    

    ...if that image is in your Seaside image, the image resource can be coded as...

    html url: WAFileLibrary / #myNewImagePng 
    

    ...which translates as...

    html url: '/files/WAFileLibrary/myNewImage.png'
    

    Normally a subclass of WAFileLibrary would be used for your application.