cover image

This commit is contained in:
Myat Zin Wai Maw
2020-03-06 11:20:16 +06:30
parent 7394ca7e8d
commit 54175ddcdf
6 changed files with 35 additions and 17 deletions

View File

@@ -0,0 +1,10 @@
class Api::DisplayImagesController < Api::ApiController
skip_before_action :authenticate
def display_image
display_image = DisplayImage.where("shop_code",params[:shop_code]).last
unless display_image.nil?
image = Base64.decode64(display_image.image.gsub(/\Adata:image\/jpeg;base64\,/, ''))
send_data image,:filename=>"shop.jpeg",:type=> "image/jpeg", :disposition => 'inline'
end
end
end