From 0e5b82f3348508eb7f4291a08722522a49edd752 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Mon, 5 Nov 2018 16:03:56 +0100 Subject: Facilitate file sending in chat --- shardweb/lib/controllers/directory_controller.ex | 4 ++-- shardweb/lib/templates/identity/view.html.eex | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'shardweb/lib') diff --git a/shardweb/lib/controllers/directory_controller.ex b/shardweb/lib/controllers/directory_controller.ex index ad5c426..d1b7136 100644 --- a/shardweb/lib/controllers/directory_controller.ex +++ b/shardweb/lib/controllers/directory_controller.ex @@ -84,12 +84,12 @@ defmodule ShardWeb.DirectoryController do info = SApp.File.get_info(pid) if info[:missing_blocks] == 0 do conn - |> put_resp_content_type(info[:mime_type]) + |> put_resp_content_type(String.trim(info[:mime_type])) |> send_file(200, info[:path]) else conn |> put_status(:not_found) - |> text("File not found or not yet completely downloaded.\n#{inspect(info)}") + |> text("File not found or not yet completely downloaded. Come back later!\n#{inspect(info)}") end end end diff --git a/shardweb/lib/templates/identity/view.html.eex b/shardweb/lib/templates/identity/view.html.eex index c81caf6..cc58ed5 100644 --- a/shardweb/lib/templates/identity/view.html.eex +++ b/shardweb/lib/templates/identity/view.html.eex @@ -20,10 +20,10 @@ <%= render ShardWeb.LayoutView, "flashes.html", assigns %> <%= if @view_pk != @pk do %> - PM + PM <% end %> - "> Public stuff + "> Public stuff
   <%= inspect(SApp.Identity.get_info(@pid), pretty: true, width: 40) %>
-- 
cgit v1.2.3