Edge Function that has subfolder?
Hi everyone.
Is it possible to have an edge function that reads JSON files in a subfolder of the function?
Function XPTO
- index.ts
- SubFolder
- f1.json
- f2.json
5 Replies
Relative imports should work, my function has an import from a parent folder, subfolders should be no different.
Does the Supabase MCP server allow deploying the package with all the needed structure? Any examples I can see?
Chat says it zips everything before uploading it. Although it also says files in parent folders aren't included, so I'll need to check my config. But your subfolder use case should be fine.
best thing to do is to try a deployment! there is also the File Storage features, to read and write files from storage...
https://supabase.com/docs/guides/functions/ephemeral-storage
File Storage | Supabase Docs
Use persistent and ephemeral file storage
yeah storage seems better for something like json here. Edge functions do have a max function size