Amazon S3: Upload File | ObjectURL triggers download instead of display | Content-Type Issue

Options
kjb-92
kjb-92 Member
edited October 2023 in ? Report a Bug

Hey all,

I want to use the S3 "Upload File" function provided by Xano.

Everything works really well, except for the fact that when I click on the image's "ObjectURL" returned from AWS, the image automatically downloads instead of being displayed in my browser which is the actual behavior I need in order to display some images in my Web App "inline".

Now: I ran some experiments and I think I have figured out the problem:
The files that are added to my S3 bucket through the Xano Amazon S3 Upload File function are by default stored with the "Content-Type" set to "application/octet-stream" in the object's meta-data.


This think this is what causes the image to download instead of open/display. When I manually set the content-type to "image/png" (since my image is a png file) I get the correct behavior of the image being opened/display within my browser.

My question is: is there something I can fix on my end to store the uploaded images with the correct content-type OR is this actually something Xano would have to look into for their "S3: Upload File" function? Maybe the function could allow for dynamically setting meta-data params?!

Would look to get feedback on my issue @Michael Udinski

____

In the following screenshot you can find some more background info on my function stack:

Comments

  • lesa
    lesa Member, Administrator

    ADMIN

    Options

    Hi Kjb 

    We’ve looked into this and there is currently no way to do this in Xano using this feature but I can confirm that it is on the Engineering Team’s radar and should hopefully be integrated by the next release happening in about a month from now. 

  • DanGardner5565
    Options

    @Michael Udinski This would be a very very helpful feature! Any idea when this will be released? Right now not having the ability to specify content type in the S3 file upload is essentially making this feature unusable for us.

  • Liz Anaya
    Liz Anaya Member, Administrator

    ADMIN

    Options

    Hey @DanGardner5565! 👋

    Like @lesa mentioned, it's on our radar, and we hope to have this ready for the next release (in about a month). We'll make sure to keep you posted on any updates. 😊