Open Closed

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


0
csbeginner 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)
  • 1
    ismcagdas created

    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.

  • 0
    csbeginner created

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

  • 1
    ismcagdas created

    @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 :).