Reputation: 3299
I have a Filemanager app, which doesn't use a Model and doesn't store anything in the database. Thus, I had to do the setup a bit differently. My setup is as follows:
When generating the files
files.each do |file|
filesObj = {
"name" => file,
"path" => File.expand_path(directory_name + '/' + file),
"modified" => File.ctime(directory_name + '/' + file),
"size" => (File.size(directory_name + '/' + file).to_f / 2**20),
"url" => url + file,
"thumb_url" => 'http://' + request.host_with_port() + '/' + dragonfly.app.fetch(url_path + '/' + file).thumb('400x200').url
}
end
The urls are generated properly, one such url is: http://localhost:3000/media/W1siZiIsIi9tZWRpYS8xLkpQRyJdLFsicCIsInRodW1iIiwiNDAweDIwMCJdXQ?sha=051428e06f681fb2
When I go to that URL, I get the following in the terminal:
Started GET "/media/W1siZiIsIi9tZWRpYS8xLkpQRyJdLFsicCIsInRodW1iIiwiNDAweDIwMCJdXQ?sha=051428e06f681fb2" for ::1 at 2017-03-01 12:57:58 -0500
DRAGONFLY: uid /media/1.JPG not found
DRAGONFLY: GET /media/W1siZiIsIi9tZWRpYS8xLkpQRyJdLFsicCIsInRodW1iIiwiNDAweDIwMCJdXQ?sha=051428e06f681fb2 404
The file exists in the media folder. Any idea why it's failing?
Upvotes: 2
Views: 755
Reputation: 3299
It failed for a couple of reasons
ImageMagick
installed.gem
is outdated, it looks for convert
command, which the ImageMagick
dropped from version 7.0
.Upvotes: 0