Paige
Explore posts from serversCDCloudflare Developers
•Created by Paige on 1/8/2025 in #general-help
Caching R2 files when using signed urls
I'm having trouble figuring out how to effectively make my cdn (cloudflare) cache properly while maintaining secure access (using s3's getSignedUrl). I cannot make cloudflare ignore the query since it would remove the restricted access, but if the query does matter it keeps request it directly from the storage and not from the cache, is there any solution?
5 replies
CDCloudflare Developers
•Created by Paige on 1/2/2025 in #general-help
R2 Bucket management
I am in the process of making a small platform, and I need to store images and audio files. My only experience so far with file storages has been GCore, and things are a bit different so I am a bit confused.
In GCore I used to have a few buckets (which had limits on objects per bucket), since my project is small (at least currently), I simply made two buckets, one for images and one for audio. In cloudflare it seems that configuration of access and such is done at "bucket level" rather than at "storage level", so this leaves me confused. For my use case, should I be using one bucket for everything? Two buckets like I used to? Or is it best to make a system that distributes across x buckets and automatically handles the configurations?
3 replies
DIdiscord.js - Imagine ❄
•Created by Paige on 11/12/2023 in #djs-voice
TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be of type string or an instance of Buff
I am currently using this to join a voice channel and play back audio, but I am getting the error "TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be of type string or an instance of Buffer or Uint8Array. Received type number (73)"
As a sanity check I logged my buffer which of course was indeed a buffer, what am I doing wrong?
Output:
8 replies