How to configure cloudflare R2 as primary storage?

Hello, could anyone help me with nextcloud and R2? I don’t know how to configure it as main storage as external storage, it didn’t work and could anyone answer my question how do I edit the files because I installed nextcloud via snap but snap won’t let me save.

Hello, I used the web installer method and then configured Nextcloud to use R2 as the main storage. I used these instructions:
For me, it is working fairly well. Sometimes Nextcloud says that it couldn’t upload files but in the end, it always uploads the files.
The real issue I am having so far is that after I delete files in Nextcloud, the space is not freed in my R2 bucket. If anyone knows how to solve this issue, it would be appreciated.