Skip to content

Commit

Permalink
Fetch local files by size
Browse files Browse the repository at this point in the history
  • Loading branch information
Doug Youch committed Jul 30, 2010
1 parent eb1521a commit 9322350
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/transmit_file_controller.rb
Expand Up @@ -13,7 +13,7 @@ def file
end
end

filename = @domain_file.filename
filename = @domain_file.filename params[:size]
mime_types = MIME::Types.type_for(filename)
send_file(filename,
:type => mime_types[0] ? mime_types[0].to_s : 'text/plain',
Expand Down
1 change: 1 addition & 0 deletions app/models/domain_file.rb
Expand Up @@ -1045,6 +1045,7 @@ def copy_local!(dest_size=nil)
return true if Server.server_id == @df.server.id

url = "/website/transmit_file/file/#{DomainModel.active_domain_id}/#{@df.id}/#{@df.server_hash}"
url += "?size=#{dest_size}" if dest_size
response = @df.server.fetch(url)
return false unless Net::HTTPSuccess === response

Expand Down

0 comments on commit 9322350

Please sign in to comment.