我有一個名爲VehiclePhotos的模型,它有附件字段'photo'。我用回形針寶石上傳照片。上傳沒問題。但是當我試圖下載圖像時,它會給出下載回形針附件時出錯
'500內部服務器錯誤'。
日誌不顯示任何錯誤的詳細信息。
vehicle_photos.rb
class VehiclePhotos < ActiveRecord::Base
has_attached_file :photo,
:url => "/uploads/:class/:id/:attachment/:attachment_fullname?:timestamp",
:path => "uploads/:class/:attachment/:id_partition/:style/:basename.:extension"
end
鑑於
,給下面的代碼來下載
<%= link_to @object.photo_file_name , @object.photo.url %>
其中包含上傳的照片文件具有名稱 'vehicle_photos',它有權限777
添加一些更多的錯誤代碼,找出錯誤的原因。 – Sravan
在瀏覽器中顯示'抱歉,出錯了',並在網絡選項卡顯示'500內部服務器錯誤'。只有這麼多顯示.. – jithya