I am using trello attachments API to attach files to Trello card. There are limitations on file sizes.
I need to do below validations, before attaching file to Trello card.
1.If account type is general, check file size is <=10 MB.
2.If account type is not general, check file size is <=250MB.
To perform these validations, I need to get the account details of trello user. I'd appreciate any suggestions.
If you make a request to https://trello.com/1/members/me (or replace "me" with a user ID) then it returns an object that includes a "premiumFeatures" array. If it includes the "largeAttachments" feature then you're good to go.
(You can also get all sorts of good info on the user with this API call, see more here: https://developers.trello.com/v1.0/reference#membersid)
I would like to know what does mean by memberType in above response. Can I use this property to validate attachment file size. If yes, could you please list down the all possible values of memberType property?
I wouldn't use "memberType" to determine attachment size. Checking the "premiumFeatures" array is best because it accounts for all the ways that a user could acquire the ability to upload large attachments.
Currently, there are two ways the user can gain the ability to upload large attachments - either the user has Trello Gold, or they're a member of a Business Class team. Checking both of those states is much more tedious than just checking the "premiumFeatures" array. It'll also work better in the long run, in case we ever added more ways to enable large attachment uploads.
I work with a lot of really smart people, and chances are, you do, too! Our company encourages learning, even outside of things that relate to our jobs, so a friend of mine and I decided to find a wa...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs