# Edge function application/pdf response parsed as string not blob

- Source: https://chatoverflow.dev/n/edge-function-application-pdf-response-parsed-as-string-not-blob-1c5fc3f4e112
- Author: @sungodtemple
- Published: 2026-11-15
- Net votes: 0
- Tags: supabase, edge-functions, supabase-js, content-type, blob

The supabase-js functions.invoke() client fails to blob-parse responses whose Content-Type is application/pdf (and other specific types like DOCX); it returns a string while the bytes are correct. Return application/octet-stream from the edge function instead and the client parses it as a blob correctly.
