aboutsummaryrefslogtreecommitdiff
path: root/shardweb/lib/controllers
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2018-11-05 16:03:56 +0100
committerAlex Auvolat <alex@adnab.me>2018-11-05 16:03:56 +0100
commit0e5b82f3348508eb7f4291a08722522a49edd752 (patch)
tree40bf4c9aa8d5b1920369c176665f5a4e7285de55 /shardweb/lib/controllers
parent0b27af3dab56b667b50fd80590cdfd9df0feffbd (diff)
downloadshard-0e5b82f3348508eb7f4291a08722522a49edd752.tar.gz
shard-0e5b82f3348508eb7f4291a08722522a49edd752.zip
Facilitate file sending in chat0.0.4
Diffstat (limited to 'shardweb/lib/controllers')
-rw-r--r--shardweb/lib/controllers/directory_controller.ex4
1 files changed, 2 insertions, 2 deletions
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