我有一个名为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