Closed areltasarim closed 2 years ago
That's strange. Do you have the latest version installed? If so, please create a small test project, upload it to GitHub and post the link here.
Well, I had a quick look..
For one, you have a mismatch between versions of PeachPie.App (1.0.0-preview3) and PeachPie.AspNetCore.Web (1.0.18).
But why are you referencing the projects at all anyway?
You don't need the projects in your Library folder. Just use the NuGet package instead; it makes everything much simpler. Here: https://www.nuget.org/packages/ResponsiveFileManager.AspNetCore/
You don't need to reference PeachPie yourself then either.. so remove everything from your Library folder.. then remove the PeachPie NuGet packages, then add the ResponsiveFileManager.AspNetCore
NuGet package.
The easiest thing is start a new, blank project and follow the instructions that I put in the README.md file: https://github.com/gordon-matt/peachpie-responsive-file-manager
Hello
I did what you said, but I still get the same error. You can review the project from this link.
No, you did not follow the instructions in the README... I see you're missing the settings in appsettings.json... and you are missing app.UseResponsiveFileManager();
... and you will also need to follow the instructions about copying the plugin for TinyMCE. Please read the instructions before asking for help again.
Also, use ResponsiveFileManager.AspNetCore
NuGet package... not ResponsiveFileManager
package
And you can remove this:
var rfmOptions = new ResponsiveFileManagerOptions();
app.Configuration.GetSection("ResponsiveFileManagerOptions").Bind(rfmOptions);
Okay I ran it sucessfully on your project. Just do this:
"ResponsiveFileManagerOptions": {
// Path from base_url to base of upload folder. Use start and final /
"UploadDirectory": "/Media/Uploads/",
// Relative path from filemanager folder to upload folder. Use final /
"CurrentPath": "../Media/Uploads/",
// Relative path from filemanager folder to thumbs folder. Use final / and DO NOT put inside upload folder.
"ThumbsBasePath": "../Media/Thumbs/",
"MaxSizeUpload": 10
}
Remove package, ResponsiveFileManager
and install package ResponsiveFileManager.AspNetCore
Change your Program.cs to this:
using Microsoft.Extensions.FileProviders;
using System.Reflection;
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddControllersWithViews();
// Adds a default in-memory implementation of IDistributedCache.
builder.Services.AddDistributedMemoryCache();
builder.Services.AddSession(options =>
{
options.IdleTimeout = TimeSpan.FromMinutes(30);
options.Cookie.HttpOnly = true;
});
var app = builder.Build();
// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
{
app.UseExceptionHandler("/Home/Error");
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseAuthorization();
app.UseSession();
app.UseDefaultFiles();
app.UseStaticFiles(); // shortcut for HostEnvironment.WebRootFileProvider
app.UseStaticFiles(new StaticFileOptions
{
RequestPath = new PathString("/filemanager"),
FileProvider = new PhysicalFileProvider(Path.GetFullPath(Path.Combine(Assembly.GetEntryAssembly().Location, "../filemanager"))),
});
app.UseResponsiveFileManager();
app.UseRouting();
app.MapControllerRoute(
name: "default",
pattern: "{controller=Home}/{action=Index}/{id?}");
app.Run();
thanks a lot for your help it worked now
Hello
.net core 6 I am getting the attached error Could you help