1
很簡單: 我想打一個<img>
-Tag如果我的文件的媒體類型是圖像多個邏輯或運算翡翠
case comment.fileType
when "image/png" || "image/gif" || "image/jpeg"
img(src="/files/#{comment.fileLink}")
不起作用
它爲PNG,但不適用於jpeg或gif。 有沒有一招?
很簡單: 我想打一個<img>
-Tag如果我的文件的媒體類型是圖像多個邏輯或運算翡翠
case comment.fileType
when "image/png" || "image/gif" || "image/jpeg"
img(src="/files/#{comment.fileLink}")
不起作用
它爲PNG,但不適用於jpeg或gif。 有沒有一招?
我認爲這將工作:
case comment.fileType
when "image/png"
when "image/gif"
when "image/jpeg"
img(src="/files/#{comment.fileLink}")
它,謝謝! –