Possible Edge Function implementation for handling BUCKET upload w/ Deno?

Hello I have tried the whole day to create a simple Edge Function which takes a post request with some form data. Eg. a pdf or png.
I have tried multiple things, but since I'm not too experience in TS, I can't get it to work.

I have tried to follow the link below, but since I'm using Deno and not Node it doesn't seem to work.
https://github.com/supabase/supabase/blob/master/examples/edge-functions/supabase/functions/file-upload-storage/index.ts

What I want to achieve
Send POST request w/ form-data to edge function -> handle the file (e.g. create a unique name by adding a typestamp) -> upload the file to supabase.

Uploading the file is not the problem, but fetching it from the Request seems to always end up in a server-error.

Have anyone successfully done this w/ deno and can help?
GitHub
The open source Firebase alternative. Contribute to supabase/supabase development by creating an account on GitHub.
Was this page helpful?