Base solution for your next web application
Open Closed

Get collection of media contents from API (Angular + Core) #6108


User avatar
0
hitaspdotnet created

Hi dears, I have migrated my eCommerce app from Core MVC to Angular. I'm verry newbie in Angular. My products images are stored in MyProject.Web.Host/wwwroot/userMedia/* I want to get product images in product-details component. I used base64 encoder and decoder and blob request from angular. Works well. My problem is where the product has presetation Videos (~5MB) or +3 images (1MB for each) I have performance issue. Have you can do this with greate app performance? I searched but I did not find any way. Very very very Thanks for any guide.


3 Answer(s)
  • User Avatar
    1
    ismcagdas created
    Support Team

    Hi @csbeginner

    We haven't done something similar but you might take a look for a video streaming angular component. Otherwise, returning all content of the video will be very slow.

  • User Avatar
    0
    hitaspdotnet created

    Thanks for comment @ismcagdas . So, Then how is possible to access to the content root of host application from client?

  • User Avatar
    1
    ismcagdas created
    Support Team

    @csbeginner

    If those contents are under wwwroot folder, you can access it already. If it is outside of wwwroot folder, you can open it to access using app.UseStaticFiles("/path-to-static-files");

    Don't remove the origianl app.UseStaticFiles() line :).