I have tried to manage R2 through firebase function.. ..without success.. but the good news is.. Try to use the workers which are implemented on CloudFlare.. ..I use it to download files, it works fine ! I suppose it will be the same to "PUT" files.. ;)