lib/tailog.rb in tailog-0.6.4 vs lib/tailog.rb in tailog-0.6.5

- old
+ new

@@ -45,9 +45,18 @@ get '/logs' do erb :'logs/index' end + get '/logs/download' do + begin + file_path = File.join Tailog.log_path, params[:file] + send_file file_path + rescue => error + content = erb :error, locals: { error: error }, layout: false + end + end + post '/logs' do begin file_path = File.join Tailog.log_path, params[:file] file = File.open file_path file_size = file.size