Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions MastodonSDK/Sources/MastodonSDK/Query/MediaAttachment.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// MediaAttachment.swift
//
//
//
// Created by jk234ert on 2/9/21.
//
Expand Down Expand Up @@ -43,7 +43,7 @@ extension Mastodon.Query.MediaAttachment {

public var mimeType: String {
switch self {
case .jpeg: return "image/jpg"
case .jpeg: return "image/jpeg"
case .gif: return "image/gif"
case .png: return "image/png"
case .other(_, _, let mimeType): return mimeType
Expand All @@ -53,7 +53,7 @@ extension Mastodon.Query.MediaAttachment {
var base64EncondedString: String? {
return data.map { "data:" + mimeType + ";base64," + $0.base64EncodedString() }
}

public var sizeInByte: Int? {
switch self {
case .jpeg(let data), .gif(let data), .png(let data):
Expand Down