Last active
February 5, 2019 22:44
-
-
Save iaindooley/722e1b89ec47bd653a93b21650810e5d to your computer and use it in GitHub Desktop.
Mirror attached file
This file contains 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
function mirrorAttachedFile(notification) | |
{ | |
var notif = new Notification(notification); | |
if(notif.member().notTrellinator()) | |
{ | |
var file = notif.attachedLink(); | |
file.card().cardsLinkedInAttachments().first().attachLink({name: file.text(),link: file.link()}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Works great for all kinds of files, except for Images (jpg, png). Here is how way I got it to work: