Forum Discussion

csolis214's avatar
6 years ago

Load a really big file for reading

Hello. I'm wondering if it's possible to put a big file into the SDK that can then be utilized by a freemarker endpoint. Is that something that is possible? 

- Christopher Solis

  • Hi csolis214 ,

    i guess you will add it into the asset foder in web > html. I have not enough information whether the mentioned file is something which is dynamically created. In case not, why are you not uploading it directly into the asset folder via Admin Dashboard.

    Regardless which way you use, all docuemtns within the assets folder can be referenced via url or in the freemarker code via context object asset:

    https://freemarker-docs-portal.lithium.com/refer/contextObjects#asset

    Hope this helps.

  • Hi csolis214 ,

    i guess you will add it into the asset foder in web > html. I have not enough information whether the mentioned file is something which is dynamically created. In case not, why are you not uploading it directly into the asset folder via Admin Dashboard.

    Regardless which way you use, all docuemtns within the assets folder can be referenced via url or in the freemarker code via context object asset:

    https://freemarker-docs-portal.lithium.com/refer/contextObjects#asset

    Hope this helps.

    • csolis214's avatar
      csolis214
      Guide

      Awesome! Exactly what I was looking for. thanks!

       

      - Christopher Solis

      • STARFLEET's avatar
        STARFLEET
        Expert

        csolis214 ,

        your welcome.
        As you mentioned that it is a very big file, lease have in mind whether timeout issues can happen, but as far as i know all stuff within assets is provided in CDN so hopefully this will not cause issues like that.

        And aslo dont forget tosue somehow an ideal way how you can reuse the readbuffer within the endpoint, in cases that the file is too big it could endup in memory errors.

        I guress you have to test it for your own and see what is working and what not 🙂