Using workers to write files to (some filesystem)

Hi, I have been working on a project in which I want to use kv namespace to save a set of data including images and was wondering what method I should use to write an image to the KV namespace.
If not do you have any recommendations on where I would be able to save my files (I have looked into google cloud storage although an all in one solution would be preffered)

Thanks!

KV probably isn’t the ideal place to store images but you could base64 encode them/decode them to store them there (they will have a larger byte size when stored this way).

I’d currently look elsewhere for static file hosting (e.g. AWS S3) using an API but that can be difficult if the API isn’t supported by cloudflare workers and you want o upload from there (note also that you’d need to use unbound workers for something like an upload which is likely going to take a while to run).

Maybe something can be done with Cloudflare Pages? Otherwise other static hosts with an API like Netlify.

1 Like

Hi Christopher thanks for your response.

I had come to a similar conclusion myself aswell but its good to get some confirmation on this topic from someone with more experience with the platform. I will look into Netlify and possibly AWS as my other options.

Thanks!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.