Skip to content

R2 #220

Answered by funkyshu
gedw99 asked this question in Q&A
R2 #220
Jan 4, 2025 · 3 comments · 1 reply
Discussion options

You must be logged in to vote

I'm generally open to the idea. The biggest concern obviously is maintaining another backend (for which we don't currently have an account to test against). I'll have to confer with my team.
Alternatively, vfs is meant to allow for external backends. See https://github.com/C2FO/vfs/blob/main/docs/backend.md. If you chose to self-publish, I'm happy to review any code and link your lib in our docs.

Finally, as far as I know, R2 is S3-compatible. I've not tested this but I'd assume you could use the s3 vfs backend doing something like:

package main

import (
	"log"

	"github.com/c2fo/vfs/v6"
	"github.com/c2fo/vfs/v6/backend/s3"
	"github.com/c2fo/vfs/v6/utils"
)

func main() {
	// Cloudflare …

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@gedw99
Comment options

Answer selected by funkyshu
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants