Download file from lambda | Content-Disposition - Amazon API Gateway p20

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 ธ.ค. 2024

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

  • @SrceCde
    @SrceCde  4 ปีที่แล้ว +1

    Part 10: th-cam.com/video/_fjTMjtZPrI/w-d-xo.html

  • @glennadams7047
    @glennadams7047 4 ปีที่แล้ว

    Another great tutorial !

    • @SrceCde
      @SrceCde  4 ปีที่แล้ว

      Thanks for stopping by Glenn Adams. I am glad that you found the tutorial helpful. Please like, share & subscribe. :)

  • @chavasaiteja8412
    @chavasaiteja8412 2 ปีที่แล้ว

    Hi Chirag - Thank you for the API playlist. I need small info, I'm unable to use the above mentioned approach for PDF files with text. Any changes to be done in response for this? Thanks in advance.

    • @SrceCde
      @SrceCde  2 ปีที่แล้ว

      Thanks for stopping by Chava Sai! Can you please check the logs for any exceptions? Secondly, please check the Content-Type.

  • @sravanthigudidevini3690
    @sravanthigudidevini3690 2 ปีที่แล้ว

    Hi, I followed all your steps but I am unable to get the filename change to . I used Content-Type as "text/csv".
    Please help

  • @pocketpicture90
    @pocketpicture90 3 ปีที่แล้ว

    Great Tutorial!Can you please suggest how to read a pdf and check if a content is already there using aws...

    • @SrceCde
      @SrceCde  3 ปีที่แล้ว

      Thanks for stopping by 777 sinha. Please check if this helps: th-cam.com/video/EqAs4lH7dXM/w-d-xo.html
      You can leverage the same PDF functionality from the above video. Let me know in case you have any further queries. Please like, share & subscribe. :)

  • @glennadams7047
    @glennadams7047 4 ปีที่แล้ว +1

    Could you do a tutorial on integrating X-ray with a Lambda ? Keep up the good work sir !

    • @SrceCde
      @SrceCde  4 ปีที่แล้ว

      Thanks for stopping by Glenn Adams. I will certainly work on the same soon. Please stay tuned. Please like, share & subscribe. :)

  • @akshayavhad2582
    @akshayavhad2582 2 ปีที่แล้ว

    Hi bro...File size is getting increased after downloading ...Pls suggest some solution

  • @sowmikeerthee3539
    @sowmikeerthee3539 4 ปีที่แล้ว

    Is it possible to fetch audio file through content disposition and play it in html audio tag?

    • @SrceCde
      @SrceCde  4 ปีที่แล้ว

      Thanks for stopping by Sowmi Keerthee. Yes, you can play the audio file in the browser. You need to change the Content-Type as audio/mpeg and Content-Disposition from attachment to inline. I hope this helps. Please like, share & subscribe. :)

  • @sarfarazahmed9348
    @sarfarazahmed9348 4 ปีที่แล้ว

    can you please also made video around Custom domain names and VPC links options present in api gateway

    • @SrceCde
      @SrceCde  4 ปีที่แล้ว +1

      Thanks for stopping by sarfaraz ahmed. I do have a tutorial on Custom Domain Name: th-cam.com/play/PL5KTLzN85O4L4Q2IM1t4-tyHzZlo4vyVu.html
      I hope this helps. I will consider making tutorial on VPC links soon. Please stay tuned. Please like, share & subscribe. :)

  • @tfhighlander2280
    @tfhighlander2280 4 ปีที่แล้ว

    Thanks, great tutorial series. Could you make a video about dealing with large files (possibly zipped files) when uploading them through api gateway?

    • @SrceCde
      @SrceCde  4 ปีที่แล้ว +1

      Thanks for stopping by Tf Highlander. One can upload up to 10 MB of the file using API Gateway since that's the API Gateway hard limit. Are you looking forward to handling

    • @tfhighlander2280
      @tfhighlander2280 4 ปีที่แล้ว

      Srce Cde Thanks for answering me. The original file is about 30 mb but once zipped it takes just 4 mb and I was wondering if it’s possible to unzip and read its content within the lambda function (possibly without an s3 bucket) after have uploaded it through the gateway.

    • @SrceCde
      @SrceCde  4 ปีที่แล้ว +1

      Yes, it is possible. For that you need to modify the lambda code. You will require two modules that are io & zipfile, hence you have to import it. Now after decoding (b64decode) the content, add these line:
      zfile = zipfile.ZipFile(io.BytesIO(decode_content), 'r')
      for file in zfile.namelist():
      # your file content
      print(zfile.read(file))
      I hope this helps. Please like, share & subscribe. :)

    • @tfhighlander2280
      @tfhighlander2280 4 ปีที่แล้ว

      Srce Cde Thank you very much, I’ve been struggling on this for a while you helped me a lot. You are doing a great job here on yt. Looking forward for your future tutorials :)

    • @SrceCde
      @SrceCde  4 ปีที่แล้ว +1

      Happy that I am able to help. Please like, share & subscribe. :)

  • @andreymatveyev3204
    @andreymatveyev3204 3 ปีที่แล้ว

    if the file is larger than 6MB the base64 method will not work. This is Lambda's limitation.

  • @Roman.Solianik
    @Roman.Solianik 3 ปีที่แล้ว

    a lot of useless info

    • @SrceCde
      @SrceCde  3 ปีที่แล้ว

      Thanks for the feedback! I will certainly consider your feedback for the future videos. :)