Holen Sie sich alle Bilder von Ordner ASP.NET
public IActionResult OnGet()
{
var provider = new PhysicalFileProvider(webHostEnvironment.WebRootPath);
var contents = provider.GetDirectoryContents(Path.Combine("uploadedfiles", "images"));
var objFiles = contents.OrderBy(m => m.LastModified);
return new JsonResult(objFiles);
}
Cautious Caterpillar