Cloudflare pages aws-sdk error

I have a problem where I can’t get metadata with aws-sdk HeadObjectCommand while deploying in cloudflare page, everything works fine during development but during production, only listObjectV2Commend works even though I want to get custom metadata like width and height which I have created. I checked the log stream there was a message like this
‘{
“outcome”: “ok”,
“scriptName”: “pages-worker–1341073-production”,
“diagnosticsChannelEvents”: ,
“exceptions”: ,
“logs”: [
{
“message”: [
“ReferenceError: FileReader is not defined\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.”
],
“level”: “error”,
“timestamp”: 1692876000941
}
],’

and this simple code on +page.server.ts

import { supabase } from "$lib/supabaseClient";
import type { PageServerLoad } from "./$types";
import { s3 } from "$lib/s3";
import {
     ListObjectsV2Command,
     HeadObjectCommand,
   } from "@aws-sdk/client-s3";

export const load: PageServerLoad = async ({ params }) => {
     const { data } = await supabase.from('<TABLE>').select('*').eq("code", params.code).single();

     const listObjectsResponse = await s3.send(new ListObjectsV2Command({ Bucket: '<BUCKET>', Prefix: `<PREFIX>` }))

     const metadata = await s3.send(new HeadObjectCommand({ Bucket: '<BUCKET>', Key: 'contents/example.jpg' })) 

     return {
          content: data ?? [],
          list: listObjectsResponse ?? [],
         testMeta: metadata ?? [}
     }
}```