bsw/jbe@0: local record = Member:by_id(param.get_id()) bsw/jbe@0: bsw/jbe@0: if false and (not record or not record.avatar) then bsw/jbe@0: print('Location: ' .. encode.url{ static = 'no_image.png' } .. '\n\n') bsw/jbe@0: exit() bsw/jbe@0: end bsw/jbe@0: bsw/jbe@0: print('Content-type: image/jpg\n') bsw/jbe@0: bsw/jbe@0: if record then bsw/jbe@0: io.stdout:write(record.avatar) bsw/jbe@0: else bsw/jbe@0: end bsw/jbe@0: bsw/jbe@0: exit()