liquid_feedback_frontend
view app/main/member_image/show.lua @ 4:80c215dbf076
Version alpha5
Many optical changes and improved usability
Support for different wiki-formatting-engines
Help system
Many optical changes and improved usability
Support for different wiki-formatting-engines
Help system
| author | bsw/jbe | 
|---|---|
| date | Thu Dec 10 12:00:00 2009 +0100 (2009-12-10) | 
| parents | |
| children | 88ac7798b562 | 
 line source
     1 local image_type = param.get("image_type")
     2 local record = MemberImage:by_pk(param.get_id(), image_type, true)
     4 if record == nil then
     5   local default_file = config.member_image_default_file[image_type]
     6   if default_file then
     7     print('Location: ' .. encode.url{ static = default_file } .. '\n\n')
     8   else
     9     print('Location: ' .. encode.url{ static = 'icons/16/lightning.png' } .. '\n\n')
    10   end
    11   exit()
    12 end
    14 print('Content-type: ' .. record.content_type .. '\n')
    16 if record then
    17   io.stdout:write(record.data)
    18 else
    19 end
    21 exit()
