How I Upload Images to CloudFlare R2 in Next.js Server Components (Presigned PUT)

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 พ.ค. 2024
  • repoz.io: www.repoz.io
    🌎 Follow me here:
    Discord: / discord
    Twitter: / tomdoes_tech
    Facebook: / tomdoestech​
    Instagram: / tomdoestech​
    TikTok: / tomdoes_tech
    ☕ Buy me a coffee: www.buymeacoffee.com/tomn
  • บันเทิง

ความคิดเห็น • 15

  • @abhishekbarkade5955
    @abhishekbarkade5955 5 วันที่ผ่านมา

    Love you man! I was facing issue to connect with client from my node app for an whole day, found solution to my issue in few minutes only. Thank you so much 🙇‍♂

  • @naylord5
    @naylord5 หลายเดือนก่อน

    Thank you Tom for this useful video! 🔥🔥
    Could you please consider extending this with a multi file upload with individual progress?
    It would be a game changer for me.

  • @TheAliAhad
    @TheAliAhad หลายเดือนก่อน

    Thanks, It would be great to make a tutorial about D1 also.

  • @regilearn2138
    @regilearn2138 หลายเดือนก่อน

    How to upload files to the aws s3 bucket using lambda functions

  • @Its-InderjeetSinghGill
    @Its-InderjeetSinghGill 13 วันที่ผ่านมา

    Hey, really liked this video. I have one question, What if we need to upload multiple files do we need to create multiple signed urls for that?

    • @TomDoesTech
      @TomDoesTech  10 วันที่ผ่านมา

      Yeah, I think you have to make multiple URLs. I haven't done it to be honest so I'm not sure

  • @V0LAT1LE_
    @V0LAT1LE_ หลายเดือนก่อน

    Tom: There won't be many tutorials on this channel anymore
    Also Tom a few days later: Makes Tutorial*

    • @TomDoesTech
      @TomDoesTech  หลายเดือนก่อน +2

      This isn't really a tutorial. This is the kind of video I'll be making in the future

    • @V0LAT1LE_
      @V0LAT1LE_ หลายเดือนก่อน

      @@TomDoesTech thats great man 😃

  • @osanyinbiyusuf7308
    @osanyinbiyusuf7308 หลายเดือนก่อน +1

    Your font is small...kindly try to enlarge next time...thank you for all you do.

  • @eddyhernandez2475
    @eddyhernandez2475 หลายเดือนก่อน +1

    3600 seconds is an hour haha 12:57

    • @TomDoesTech
      @TomDoesTech  หลายเดือนก่อน +1

      I was thinking it was ms

  • @PremJethwa-qj2mp
    @PremJethwa-qj2mp หลายเดือนก่อน

    Hi Tom Thanks for such a helpfull video, I'm Facing one issue while accessing the image in FrontEnd using the Token (ReadOnly access)
    Here is how I'm call
    export const fetchMedia = async (url) => {
    const token = "myToken"; // Replace with your actual access token
    try {
    const response = await axios.get(url, {
    method: "GET",
    headers: {
    Authorization: `Bearer ${token}`,
    },
    });
    if (!response.ok) {
    console.error(
    `Failed to fetch media: ${response.status} ${response.statusText}`
    );
    console.error("Response details:", await response.text());
    throw new Error(`Failed to fetch media: ${response.statusText}`);
    }
    const blob = await response.blob();
    const mediaUrl = URL.createObjectURL(blob);
    return mediaUrl;
    } catch (error) {
    console.error("Error fetching media:", error);
    return null;
    }
    };

    • @TomDoesTech
      @TomDoesTech  หลายเดือนก่อน

      Why do you need to fetch the image on the frontend? I don't understand