Skip to content

Commit

Permalink
Merge pull request #58 from airdcpp-web/develop
Browse files Browse the repository at this point in the history
0.14.2
  • Loading branch information
maksis committed Jan 26, 2016
2 parents 346a534 + d163363 commit 2698289
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion airdcpp-webapi/api/ViewFileApi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ namespace webserver {
}

json ViewFileApi::serializeFile(const ViewFilePtr& aFile) noexcept {
auto mimeType = FileServer::getMimeType(aFile->getPath());
return{
{ "id", aFile->getTTH().toBase32() },
{ "tth", aFile->getTTH().toBase32() },
Expand All @@ -63,7 +64,7 @@ namespace webserver {
{ "type", Serializer::serializeFileType(aFile->getPath()) },
{ "time_finished", aFile->getTimeFinished() },
{ "downloaded", !aFile->isLocalFile() },
{ "mime_type", FileServer::getMimeType(aFile->getPath()) },
{ "mime_type", mimeType ? mimeType : Util::emptyString },
};
}

Expand Down
1 change: 1 addition & 0 deletions airdcpp-webapi/web-server/FileServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ namespace webserver {
{ "bat", "text/plain" },
{ "vb", "text/plain" },
{ "cs", "text/plain" },
{ "nfo", "text/x-nfo" },
{ "pl", "text/plain" },
{ "py", "text/plain" },
{ "class", "text/plain" },
Expand Down

0 comments on commit 2698289

Please sign in to comment.