Added build time showing

Fixed package downloading 503 error
This commit is contained in:
Alexey Berezhok
2025-12-03 23:47:03 +03:00
parent 54bf61d301
commit f2136260c9
8 changed files with 34 additions and 5 deletions

5
app.rb
View File

@@ -980,8 +980,9 @@ get "/buildinfofraw" do
if params["file"].nil? || !File.exist?(params["file"])
print_error_page(503, "Файл не найден")
else
if !File.binary?(params["file"]) && params["file"].start_with?(File.join(Dir.pwd(), cfg.get_projects_path))
send_file params["file"]
if File.binary?(params["file"]) && params["file"].start_with?(File.join(Dir.pwd(), cfg.get_projects_path))
f_name = File.basename(params["file"])
send_file(params["file"], :filename => f_name, :type => "application/octet-stream", :disposition => 'attachment')
else
print_error_page(503, "Файл не может быть скачан")
end