Created
June 12, 2019 13:16
-
-
Save tmcneill-reifyhealth/eb44299c3c9ec69ca3c806d856d33c81 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def spreadsheet-regex | |
#"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") | |
(defn content-type-spreadsheet? [content-type] | |
(when content-type | |
(re-find spreadsheet-regex content-type))) | |
(defn has-spreadsheet? [msg] | |
(and (:multipart? msg) | |
(some content-type-spreadsheet? | |
(map :content-type (:body msg))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment