File System

Is there a way to access files in your project in workers? I've been trying to host stuff on the same file, Like using deno on the file and then wrangler deploy to post it onto cloudflare, But as it is, Files are a massive issues, I can't host my libraries code, Had to use pastebin, Is there a way to access files? (I am not going to use KV objects, I want something that works with deno aswell), Thanks for your time!
19 Replies
hyteq
hyteq7mo ago
s3?
bat ✞
bat ✞OP7mo ago
What's that
hyteq
hyteq7mo ago
S3 buckets file storage either via AWS or there's some in cloudflare also alternatively uploadthing
bat ✞
bat ✞OP7mo ago
I need something that can run stuff like cloudflare workers on localhost with the same environment deno is the closest thing i found
hyteq
hyteq7mo ago
what kind of files do you need to access?
bat ✞
bat ✞OP7mo ago
txt Need to send GET requests from the client to the server and return these files' contents
hyteq
hyteq7mo ago
if txt files, why not store the txt as content in database?
bat ✞
bat ✞OP7mo ago
Like /libs/file1, /libs/file2
hyteq
hyteq7mo ago
there's no formatting
bat ✞
bat ✞OP7mo ago
I want them to work on localhost aswell, Not sure what your question is
hyteq
hyteq7mo ago
that works on localhost too if you connect to the same database
bat ✞
bat ✞OP7mo ago
I mean where can I get a database I'm pretty new to this workers stuff
hyteq
hyteq7mo ago
cloudflare d1? neon? prisma plenty of databases but S3 might be simpler for you, for workers so look into cloudflare S3 storage
bat ✞
bat ✞OP7mo ago
Thank you very much
hyteq
hyteq7mo ago
no worries
bat ✞
bat ✞OP7mo ago
I'm using js though, Will that work in it?
hyteq
hyteq7mo ago
yep alot of SDKs for it try asking chatgpt for more help
bat ✞
bat ✞OP7mo ago
Thank you
hyteq
hyteq7mo ago
it'll give you a more detailed roadmap based on your usecase no worries balls man 3761

Did you find this page helpful?