I am trying to run an ASP5/MVC6 ASPNET core application in Ubuntu 16.04 using dotnet core 1.1. My application resides in one directory off of the users home directory, and
By default static files should be located in the wwwroot folder, which inside you working folder. But if you want to keep them outside you can configure the static files middleware:
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
app.UseStaticFiles();
app.UseStaticFiles(new StaticFileOptions()
{
FileProvider = new PhysicalFileProvider(
Path.Combine(Directory.GetCurrentDirectory(), @"MyStaticFiles")),
RequestPath = new PathString("/StaticFiles")
});
}
See tutorial here.
you can use 'ln' to Make a Link to '/home/myuser/myimages' in your working directory
then you can reference files in your working directory