From 2b5f4dea9a570b95fa3a13d890d9035690439794 Mon Sep 17 00:00:00 2001 From: Ondrej Rafaj Date: Thu, 15 Dec 2016 00:21:10 +0000 Subject: [PATCH] fixing compile bug --- Sources/S3.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Sources/S3.swift b/Sources/S3.swift index 82abc3a..a9ead50 100644 --- a/Sources/S3.swift +++ b/Sources/S3.swift @@ -10,6 +10,7 @@ import Foundation import Vapor import S3SignerAWS import HTTP +import MimeLib /** Available access control list values for "x-amz-acl" header as specified in AWS documentation @@ -240,10 +241,10 @@ public class S3 { internal extension S3 { internal func mimeType(forFileAtUrl url: URL) -> String { - guard let mime: String = Mime.string(fileUrl: url) else { + guard let mime: String = Mime.string(forUrl: url) else { return "application/octet-stream" } - return mime.rawValue + return mime } internal func vaporHeaders(_ headers: [String: String]) -> [HeaderKey : String] {