Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

6
  • @sfdxfox, thanks! I just checked... I do have my scratch org definition set to Enterprise, but that still only gives me 50 MB of File Storage. At least I know my code isn't causing the problem. Commented Nov 18, 2018 at 20:39
  • do you know the best way to access File Storage Limit and Usage through Apex? I'm researching and seeing a few threads from as far back as 2012. Bob Buzzard is talking about creating a VF page and then scraping it to pull that data. I'm hoping there's a more direct way now... Commented Nov 18, 2018 at 21:14
  • I found instructions on making a cURL call to get the info: help.salesforce.com/articleView?id=000213191&type=1 and I found your post about cURL to Apex: salesforce.stackexchange.com/questions/67867/…. It seems really crazy to have to make an HTTP call to the org you're in to get the info! Also, I'm not sure how I'd handle auth... Commented Nov 18, 2018 at 21:38
  • @PatMcClellan__c In Lightning, you have to do the named credential approach, which means you'll have to set a password for the scratch org and go through a manual process each time. Or, you can try the Visualforce cheat which some people have also put on github (example). Some day maybe we'll have a real way to do this, but that's not today. Commented Nov 18, 2018 at 23:48
  • sorry, I see I messed up your handle above because my hand is so used to typing sfdx! I was hoping to build in a way of disabling uploads when file storage capacity is reached, but I think that's more feature than I need. Commented Nov 20, 2018 at 0:04