How to store photos in your app's backend?

Поделиться
HTML-код
  • Опубликовано: 18 сен 2024

Комментарии • 26

  • @lev0x79
    @lev0x79 2 года назад +3

    Awesome video, man! You are helping me to be a better dev!

    • @irtizahafiz
      @irtizahafiz  2 года назад +2

      That means a ton! These are helping me grow a ton too : ) Glad you enjoyed it.

  • @Bob65001
    @Bob65001 Год назад +3

    THANKYOU FOR EXPLAINING THIS! I need explanations instead of just instructions- so much more useful!

  • @Nachiket_upadhye_23
    @Nachiket_upadhye_23 Год назад +1

    Excellent video. It helped me a lot for report. keep up the good work.

  • @palacystudios9350
    @palacystudios9350 5 месяцев назад +1

    Nice video!

  • @Konslufius
    @Konslufius 2 года назад +12

    So instead of putting the image directly into your database, you store it in a file storage system and store the path+name inside your database.

  • @johnslick8940
    @johnslick8940 8 месяцев назад +1

    Absolutely amazing video man, thank you very much for covering this topic.

  • @veerendrashukla
    @veerendrashukla Год назад +2

    When client uses IMG tag, file goes as binary to backend, who actually converts this binary data into image file? Does AWS S3 stores binary and convert into an image file and gives path back to the backend server?

    • @irtizahafiz
      @irtizahafiz  10 месяцев назад

      You will have to handle it in your backend.
      Typically, you load the binary, convert it into an image file, and then upload the image to S3. Then you store the S3 URL in your database.

  • @SuperT
    @SuperT Год назад

    I unintentionally figured this out because I failed to put the image in my actual database/retrieve it so I just used S3 and a CDN

  • @jasongrant2366
    @jasongrant2366 7 месяцев назад

    Please respond!
    When you say "do not store image directly into database as binary data" do you men that we should not store it directly in the webhosting ej: Hostgator? should we always look for external applications like AWS, Coudinary...
    Thank you for responding!

    • @irtizahafiz
      @irtizahafiz  6 месяцев назад

      AWS S3 is a good choice!

  • @SIBUK
    @SIBUK 2 года назад

    If you have multiple users all uploading their images to the same s3 bucket though then how do you prevent a malicious user from accessing other peoples images?

    • @irtizahafiz
      @irtizahafiz  Год назад

      Hi! This was just for demo purposes. Realistically you would have much stronger security and AWS policies built in.

  • @DesselBane
    @DesselBane Год назад

    ty

  • @mythm2063
    @mythm2063 Год назад

    a Question please :
    what if we only want to give the access to the image only if the request came from out app, and deny access from other places,. For example if we paste directly the resource URL in browser the access will be denied

    • @vasiledamian8661
      @vasiledamian8661 Год назад +1

      Think it'd be something along the lines of setting your s3 bucket private, then when getting the image you want to get it throught the backend and sending it to the front? that way you can control access through your app

    • @mythm2063
      @mythm2063 Год назад

      @@vasiledamian8661 thanks a lot brother

  • @kacyos_kleyton
    @kacyos_kleyton 5 месяцев назад

    após algumas horas procurando finalmente encontrei alguem que explique oque eu estava tentando entender.
    nice video bro!

  • @kuroisan2698
    @kuroisan2698 Год назад

    wish you will see my comment !
    I have a problem with organization in general
    Should I store all images in one folder ? even if I have 10 millions images !!! or I should create multiple folders in the images folder ? if yes, depending on what ? on the user ? well if on the user then it is not a good idea you know
    not only storing images, I mean if we take facebook as an example
    you create Post so it stores all posts in one folder ( I should call it documentary in mongoDb I guess anyway ) that will be hard to search for on post just with an ID and there are millions of posts

    • @irtizahafiz
      @irtizahafiz  10 месяцев назад

      I think there are multiple ways to implement this.
      I would recommend thinking less about "folders" and more about your "file name" to create some kind of a hierarchy.

  • @Takatou__Yogiri
    @Takatou__Yogiri 2 месяца назад

    i thought i finnally found a way to store image using file system. but nah. here we are again with the same shyt. why is it so hard to find a single fuking video about this where millions of website using file system.