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
hyteq3d ago
s3?
♱
OP3d ago
What's that
hyteq
hyteq3d ago
S3 buckets file storage either via AWS or there's some in cloudflare also alternatively uploadthing
♱
OP3d 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
hyteq3d ago
what kind of files do you need to access?
♱
OP3d ago
txt Need to send GET requests from the client to the server and return these files' contents
hyteq
hyteq3d ago
if txt files, why not store the txt as content in database?
♱
OP3d ago
Like /libs/file1, /libs/file2
hyteq
hyteq3d ago
there's no formatting
♱
OP3d ago
I want them to work on localhost aswell, Not sure what your question is
hyteq
hyteq3d ago
that works on localhost too if you connect to the same database
♱
OP3d ago
I mean where can I get a database I'm pretty new to this workers stuff
hyteq
hyteq3d ago
cloudflare d1? neon? prisma plenty of databases but S3 might be simpler for you, for workers so look into cloudflare S3 storage
♱
OP3d ago
Thank you very much
hyteq
hyteq3d ago
no worries
♱
OP3d ago
I'm using js though, Will that work in it?
hyteq
hyteq3d ago
yep alot of SDKs for it try asking chatgpt for more help
♱
OP3d ago
Thank you
hyteq
hyteq3d ago
it'll give you a more detailed roadmap based on your usecase no worries balls man 3761

Did you find this page helpful?