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
Sleddog
Sleddog4w ago
Relative imports should work, my function has an import from a parent folder, subfolders should be no different.
Luis Simões
Luis SimõesOP4w ago
Does the Supabase MCP server allow deploying the package with all the needed structure? Any examples I can see?
Sleddog
Sleddog4w ago
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.
tomaspozo
tomaspozo4w ago
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
ihm40
ihm404w ago
yeah storage seems better for something like json here. Edge functions do have a max function size

Did you find this page helpful?