Add getMiniflareR2Bucket helper method - R2 Helper method
See original GitHub issueBy adding the helper method getMiniflareR2Bucket one can get a bucket just by:
const bucket = await getMiniflareR2Bucket('BUCKET');
without having to create a new Miniflare instance
global.getMiniflareR2Bucket = async (bucket) => {
const plugin = (await mf.getPlugins()).R2Plugin;
const storage = mf.getPluginStorage("R2Plugin");
return plugin.getBucket(storage, bucket);
}
Issue Analytics
- State:
- Created a year ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Define helper methods in a module - RSpec Core - Relish
You can define helper methods in a module and include it in your example groups using the config.include configuration option. config.extend can be...
Read more >Rails: Where to define a helper method that will be available ...
I would like to define a helper method, my_method , that will be available inside BuyersController methods (like index , create , e.t.c.)....
Read more >How do I correctly add a helper method to my Apex Class?
1. I've added the helper method to one of my own classes. · I've tried to paste it between the ' Messaging. ·...
Read more >How to Use Rails Helpers (Complete Guide) - RubyGuides
A helper is a method that is (mostly) used in your Rails views to share reusable code. ... Here's where you can add...
Read more >Rails 5 adds helpers method in controllers for ease - BigBinary
Rails 5 series | We can now use helpers method to call helper methods in controller.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You are kidding right? You did an awesome work!
Do you have any idea of how much you helped me out?
Besides, this is a minor thing!
No worries! Yep, that’s what I was thinking of. 🙂